public class Ranks extends NaryFunction implements JepComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
Ranks.Type
Type of Rank to calculate.
|
curNumberOfParameters, name, NaN, numberOfParameters| Constructor and Description |
|---|
Ranks(Ranks.Type type,
boolean descending,
FieldI f)
Construct the rank function.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
java.lang.Object |
eval(java.lang.Object[] args)
Evaluate the function
|
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.
|
void |
init(Jep jep)
Initialize the component.
|
runasArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toStringpublic Ranks(Ranks.Type type, boolean descending, FieldI f)
type - Method used to calculate ranks, Type.COMPETITION is standarddescending - whether ranks are calculated in descending (standard) or
ascending order. In descending order the highest term has a rank of 1.f - fieldpublic boolean checkNumberOfParameters(int n)
PostfixMathCommandcheckNumberOfParameters in interface PostfixMathCommandIcheckNumberOfParameters in class PostfixMathCommandn - number of parameters function will be called with.public java.lang.Object eval(java.lang.Object[] args)
throws EvaluationException
NaryFunctioneval in class NaryFunctionargs - arguments to the functionEvaluationException - if the calculation cannot be performedpublic void init(Jep jep)
JepComponentinit in interface JepComponentjep - the current Jep instancepublic JepComponent getLightWeightInstance()
JepComponentgetLightWeightInstance in interface JepComponentCopyright © 2018 Singular Systems http://www.singularsys.com/jep