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 Details

    • DoubleCompatibleValue

      public DoubleCompatibleValue()
  • Method Details

    • type

      public com.yahoo.tensor.TensorType type()
      Description copied from class: Value
      Returns the type of this value
      Specified by:
      type in class 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
      Specified by:
      hasDouble in class Value
    • asTensor

      public com.yahoo.tensor.Tensor asTensor()
      Description copied from class: Value
      Returns this as a tensor value
      Specified by:
      asTensor in class Value
    • negate

      public Value negate()
      Specified by:
      negate in class Value
    • add

      public Value add(Value value)
      Specified by:
      add in class Value
    • subtract

      public Value subtract(Value value)
      Specified by:
      subtract in class Value
    • multiply

      public Value multiply(Value value)
      Specified by:
      multiply in class Value
    • divide

      public Value divide(Value value)
      Specified by:
      divide in class Value
    • modulo

      public Value modulo(Value value)
      Specified by:
      modulo in class Value
    • and

      public Value and(Value value)
      Specified by:
      and in class Value
    • or

      public Value or(Value value)
      Specified by:
      or in class Value
    • not

      public Value not()
      Specified by:
      not in class Value
    • power

      public Value power(Value value)
      Specified by:
      power in class 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
      Specified by:
      compare in class Value
    • function

      public Value function(Function function, Value value)
      Description copied from class: Value
      Perform the given binary function on this value and the given value
      Specified by:
      function in class Value