Interface FunctionEvaluator

  • All Known Subinterfaces:
    NondeterministicFunctionEvaluator

    public interface FunctionEvaluator
    An executor of a function. The inputs and output are expected to already be bound at construction of the evaluator.

    Creating a new function requires, at the very least, writing an implementation of FunctionEvaluator and defining instances of the function using the methods available in ScalarFunctionDescriptor.

    To leverage the provided framework for functions, implementations should have a single constructor which takes the result buffer (of a subtype of ScalarSettable) as the first argument with the function arguments as the remaining constructor arguments, in the order they were specified in the function descriptor. Varargs are supported for ScalarValuedFunction arguments, using an array (or vararg) or list as the last constructor argument.

    FunctionEvaluator implementations do not need to be serializable as JSON, as they are constructed only within the context of an executing graph.

    See Also:
    ScalarValuedFunction, ScalarFunctionDescriptor, ReflectiveFactory
    • Method Detail

      • evaluate

        void evaluate()
        Evaluate the function with the bound inputs, placing the result in the bound output.