java.lang.Object
com.pervasive.datarush.functions.WavgFunctionInvoker
- All Implemented Interfaces:
FunctionInvoker
A specialized function invoker for wavg.
It takes an even number of arguments; each pair of arguments consists of any
ScalarValuedFunction (the value to be averaged,) followed by a numeric constant
(the weight of that value.) The ScalarValuedFunctions are arranged into a list,
and the numeric constants are arranged into an array of floats. These two
resulting data structures are passed to the method in that order.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninvoke(Method m, ScalarValuedFunction[] args) Invokes a method to return a ScalarValuedFunction, using the given arguments.
-
Constructor Details
-
WavgFunctionInvoker
public WavgFunctionInvoker()
-
-
Method Details
-
invoke
public Object invoke(Method m, ScalarValuedFunction[] args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException Description copied from interface:FunctionInvokerInvokes a method to return a ScalarValuedFunction, using the given arguments.- Specified by:
invokein interfaceFunctionInvoker- Parameters:
m- The method to invoke.args- The ScalarValuedFunction arguments from the call to the FunctionRegistry.- Returns:
- The ScalarValuedFunction or Aggregation returned by invoking the method.
- Throws:
IllegalArgumentExceptionIllegalAccessExceptionInvocationTargetException
-