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 Summary
Constructors Constructor Description ExpressionTensorFunction(ExpressionNode expression)
-
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)
-
-
-
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 classcom.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 classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
toPrimitive
public com.yahoo.tensor.functions.PrimitiveTensorFunction<Reference> toPrimitive()
- Specified by:
toPrimitive
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
type
public com.yahoo.tensor.TensorType type(com.yahoo.tensor.evaluation.TypeContext<Reference> context)
- Specified by:
type
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
asScalarFunction
public java.util.Optional<com.yahoo.tensor.functions.ScalarFunction<Reference>> asScalarFunction()
- Overrides:
asScalarFunction
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
evaluate
public com.yahoo.tensor.Tensor evaluate(com.yahoo.tensor.evaluation.EvaluationContext<Reference> context)
- Specified by:
evaluate
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
toString
public java.lang.String toString(com.yahoo.tensor.functions.ToStringContext c)
- Specified by:
toString
in classcom.yahoo.tensor.functions.TensorFunction<Reference>
-
-