- java.lang.Object
-
- com.pervasive.datarush.functions.WavgFunctionInvoker
-
- All Implemented Interfaces:
FunctionInvoker
public class WavgFunctionInvoker extends Object implements 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 Constructor Description WavgFunctionInvoker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
invoke(Method m, ScalarValuedFunction[] args)
Invokes a method to return a ScalarValuedFunction, using the given arguments.
-
-
-
Method Detail
-
invoke
public Object invoke(Method m, ScalarValuedFunction[] args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
Description copied from interface:FunctionInvoker
Invokes a method to return a ScalarValuedFunction, using the given arguments.- Specified by:
invoke
in 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:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
-
-