Class TensorFunctionNode.ExpressionTensorFunction

java.lang.Object
com.yahoo.tensor.functions.TensorFunction<NAMETYPE>
com.yahoo.tensor.functions.PrimitiveTensorFunction<Reference>
com.yahoo.searchlib.rankingexpression.rule.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 Details

    • ExpressionTensorFunction

      public ExpressionTensorFunction(ExpressionNode expression)
  • Method Details

    • wrappedExpression

      public ExpressionNode wrappedExpression()
    • 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>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class com.yahoo.tensor.functions.TensorFunction<Reference>
    • toString

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