Class DoubleCompatibleValue
- java.lang.Object
-
- com.yahoo.searchlib.rankingexpression.evaluation.Value
-
- com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
-
- Direct Known Subclasses:
BooleanValue
,DoubleValue
,LongValue
public abstract class DoubleCompatibleValue extends Value
A value which acts as a double in numerical context.- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description DoubleCompatibleValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
add(Value value)
Value
and(Value value)
com.yahoo.tensor.Tensor
asTensor()
Returns this as a tensor valueValue
compare(TruthOperator operator, Value value)
Perform the comparison specified by the operator between this value and the given valueValue
divide(Value value)
Value
function(Function function, Value value)
Perform the given binary function on this value and the given valueboolean
hasDouble()
Returns true if this value can return itself as a double, i.e asDoubleValue will return a value and not throwValue
modulo(Value value)
Value
multiply(Value value)
Value
negate()
Value
not()
Value
or(Value value)
Value
power(Value value)
Value
subtract(Value value)
com.yahoo.tensor.TensorType
type()
Returns the type of this value
-
-
-
Method Detail
-
type
public com.yahoo.tensor.TensorType type()
Description copied from class:Value
Returns the type of this value
-
hasDouble
public boolean hasDouble()
Description copied from class:Value
Returns true if this value can return itself as a double, i.e asDoubleValue will return a value and not throw
-
asTensor
public com.yahoo.tensor.Tensor asTensor()
Description copied from class:Value
Returns this as a tensor value
-
compare
public Value compare(TruthOperator operator, Value value)
Description copied from class:Value
Perform the comparison specified by the operator between this value and the given value
-
-