public class AstNumList extends AstParameter
| Modifier and Type | Field and Description |
|---|---|
double[] |
_bases |
boolean |
_isList |
boolean |
_isSort |
| Constructor and Description |
|---|
AstNumList() |
AstNumList(java.util.ArrayList<java.lang.Double> bases,
java.util.ArrayList<java.lang.Double> strides,
java.util.ArrayList<java.lang.Long> counts) |
AstNumList(double d) |
AstNumList(double[] list) |
AstNumList(int[] list) |
AstNumList(long lo,
long hi_exclusive) |
| Modifier and Type | Method and Description |
|---|---|
long |
cnt() |
int[] |
columns(java.lang.String[] names) |
Val |
exec(Env env)
"Execute" this AST expression, and return the result.
|
double[] |
expand() |
int[] |
expand4() |
long[] |
expand8() |
long[] |
expand8Sort() |
boolean |
has(long v) |
long |
index(long v)
Finds index of a given value in this number sequence, indexing start at 0.
|
boolean |
isDense() |
boolean |
isEmpty() |
double |
max() |
double |
min() |
AstNumList |
sort() |
java.lang.String |
str()
String representation of this Ast object in the Rapids language.
|
java.lang.String |
toJavaString() |
description, exampleasBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSONpublic final double[] _bases
public final boolean _isList
public boolean _isSort
public AstNumList(java.util.ArrayList<java.lang.Double> bases,
java.util.ArrayList<java.lang.Double> strides,
java.util.ArrayList<java.lang.Long> counts)
public AstNumList(double d)
public AstNumList(long lo,
long hi_exclusive)
public AstNumList()
public AstNumList(double[] list)
public AstNumList(int[] list)
public Val exec(Env env)
AstRoot"Execute" this AST expression, and return the result. For different ASTs this may have different interpretation. For example, consider this Rapids expression:
(mean frame True False)
It will be parsed into the following structure:
AstExec() instance with
_asts = [AstMean() singleton instance,
new AstId(frame),
AstConst.TRUE,
AstConst.FALSE]
Execution of AstExec will execute its first argument, _asts[0],
verify that it produces a function (ValFun), then call
AstPrimitive.apply(Env, Env.StackHelp, AstRoot[]) on that function
passing down the list of _asts arguments.
The AstMean class will in turn execute all its arguments,
where execution of AstId fetches the referred symbol from the
environment, and execution of AstConst returns the value of that
constant.
Certain other functions may choose not to evaluate all their arguments (for example boolean expressions providing short-circuit evaluation).
public java.lang.String str()
AstRootAstPrimitives this is the name of the function; for
AstParameters this is either the name of the variable, or the
value of the numeric constant that the parameter represents. For more
complicated constructs such as AstExec or AstFunction
this method should return those objects as a Rapids string.public java.lang.String toJavaString()
toJavaString in class AstParameterpublic double[] expand()
public AstNumList sort()
public int[] expand4()
public long[] expand8()
public long[] expand8Sort()
public double max()
public double min()
public long cnt()
public boolean isDense()
public boolean isEmpty()
public boolean has(long v)
public long index(long v)
v - valuepublic int[] columns(java.lang.String[] names)
columns in class AstParameter