Class DoubleCompatibleValue
java.lang.Object
com.yahoo.searchlib.rankingexpression.evaluation.Value
com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
- Direct Known Subclasses:
BooleanValue
,DoubleValue
,LongValue
A value which acts as a double in numerical context.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.yahoo.tensor.Tensor
asTensor()
Returns this as a tensor valuecompare
(TruthOperator operator, Value value) Perform the comparison specified by the operator between this value and the given valuePerform the given binary function on this value and the given valueboolean
Returns true if this value can return itself as a double, i.e asDoubleValue will return a value and not thrownegate()
not()
com.yahoo.tensor.TensorType
type()
Returns the type of this value
-
Constructor Details
-
DoubleCompatibleValue
public DoubleCompatibleValue()
-
-
Method Details
-
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 -
negate
-
add
-
subtract
-
multiply
-
divide
-
modulo
-
and
-
or
-
not
-
power
-
compare
Description copied from class:Value
Perform the comparison specified by the operator between this value and the given value -
function
Description copied from class:Value
Perform the given binary function on this value and the given value
-