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.
    • Constructor Detail

      • ExpressionTensorFunction

        public ExpressionTensorFunction​(ExpressionNode expression)
    • Method Detail

      • arguments

        public 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​(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 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 String toString()
        Overrides:
        toString in class com.yahoo.tensor.functions.TensorFunction<Reference>
      • toString

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