Class ExpressionNode

    • Constructor Detail

      • ExpressionNode

        public ExpressionNode()
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public abstract StringBuilder toString​(StringBuilder builder,
                                               SerializationContext context,
                                               Deque<String> path,
                                               CompositeNode parent)
        Returns a script instance of this based on the supplied script functions.
        Parameters:
        builder - the StringBuilder that will be appended to
        context - the serialization context
        path - the call path to this, used for cycle detection, or null if this is a root
        parent - the parent node of this, or null if it a root
        Returns:
        the main script, referring to script instances.
      • type

        public abstract com.yahoo.tensor.TensorType type​(com.yahoo.tensor.evaluation.TypeContext<Reference> context)
        Returns the type this will return if evaluated with the given context.
        Parameters:
        context - the variable type bindings to use for this evaluation
        Throws:
        IllegalArgumentException - if there are variables which are not bound in the given map
      • evaluate

        public abstract Value evaluate​(Context context)
        Returns the value of evaluating this expression over the given context.
        Parameters:
        context - the variable bindings to use for this evaluation
        Throws:
        IllegalArgumentException - if there are variables which are not bound in the given map