public abstract class AstReducerOp extends AstPrimitive
Constructor and Description |
---|
AstReducerOp() |
Modifier and Type | Method and Description |
---|---|
Val |
apply(Env env,
Env.StackHelp stk,
AstRoot[] asts)
Primary method to invoke this function, passing all the parameters
as the `asts` list.
|
int |
nargs()
Number of function's arguments + 1.
|
abstract double |
op(double l,
double r)
Override to express a basic math primitive
|
args, description, example, exec
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public int nargs()
AstPrimitive
nargs
in class AstPrimitive
public Val apply(Env env, Env.StackHelp stk, AstRoot[] asts)
AstPrimitive
Primary method to invoke this function, passing all the parameters as the `asts` list.
apply
in class AstPrimitive
env
- Current execution environment. Variables are looked up here.stk
- TODO need clarificationasts
- List of AstRoot expressions that are arguments to the
function. First element in this list is the function itself.public abstract double op(double l, double r)