Class TensorFunctionNode.ExpressionTensorFunction

  • Enclosing class:
    TensorFunctionNode

    public static class TensorFunctionNode.ExpressionTensorFunction
    extends com.yahoo.tensor.functions.PrimitiveTensorFunction<Reference>
    A tensor function implemented by an expression. This allows us to pass expressions as tensor function arguments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<com.yahoo.tensor.functions.TensorFunction<Reference>> arguments()  
      java.util.Optional<com.yahoo.tensor.functions.ScalarFunction<Reference>> asScalarFunction()  
      com.yahoo.tensor.Tensor evaluate​(com.yahoo.tensor.evaluation.EvaluationContext<Reference> context)  
      com.yahoo.tensor.functions.PrimitiveTensorFunction<Reference> toPrimitive()  
      java.lang.String toString()  
      java.lang.String toString​(com.yahoo.tensor.functions.ToStringContext c)  
      com.yahoo.tensor.TensorType type​(com.yahoo.tensor.evaluation.TypeContext<Reference> context)  
      com.yahoo.tensor.functions.TensorFunction<Reference> withArguments​(java.util.List<com.yahoo.tensor.functions.TensorFunction<Reference>> arguments)  
      • Methods inherited from class com.yahoo.tensor.functions.TensorFunction

        evaluate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ExpressionTensorFunction

        public ExpressionTensorFunction​(ExpressionNode expression)
    • Method Detail

      • arguments

        public java.util.List<com.yahoo.tensor.functions.TensorFunction<Reference>> arguments()
        Specified by:
        arguments in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • withArguments

        public com.yahoo.tensor.functions.TensorFunction<Reference> withArguments​(java.util.List<com.yahoo.tensor.functions.TensorFunction<Reference>> arguments)
        Specified by:
        withArguments in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • toPrimitive

        public com.yahoo.tensor.functions.PrimitiveTensorFunction<Reference> toPrimitive()
        Specified by:
        toPrimitive in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • type

        public com.yahoo.tensor.TensorType type​(com.yahoo.tensor.evaluation.TypeContext<Reference> context)
        Specified by:
        type in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • asScalarFunction

        public java.util.Optional<com.yahoo.tensor.functions.ScalarFunction<Reference>> asScalarFunction()
        Overrides:
        asScalarFunction in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • evaluate

        public com.yahoo.tensor.Tensor evaluate​(com.yahoo.tensor.evaluation.EvaluationContext<Reference> context)
        Specified by:
        evaluate in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • toString

        public java.lang.String toString​(com.yahoo.tensor.functions.ToStringContext c)
        Specified by:
        toString in class com.yahoo.tensor.functions.TensorFunction<Reference>