Class DoubleCompatibleValue

  • Direct Known Subclasses:
    BooleanValue, DoubleValue

    public abstract class DoubleCompatibleValue
    extends Value
    A value which acts as a double in numerical context.
    Author:
    bratseth
    • Constructor Detail

      • DoubleCompatibleValue

        public DoubleCompatibleValue()
    • Method Detail

      • 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
      • 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