Class ListReturningFunction
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.NaryFunction
-
- com.singularsys.extensions.statistical.ListReturningFunction
-
- All Implemented Interfaces:
MatrixFunctionI
,JepComponent
,PostfixMathCommandI
,java.io.Serializable
- Direct Known Subclasses:
Ranks
,SortElements
public abstract class ListReturningFunction extends NaryFunction implements JepComponent, MatrixFunctionI
Base class for functions which return lists or vectors. Uses in orderListProcessor.fromCollection(java.util.Collection)
MatrixFactoryI.newVector(Object...)
- The List PFMC returned by
OperatorTableI.getList()
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PostfixMathCommandI
listFun
protected ListProcessor
lp
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description ListReturningFunction()
ListReturningFunction(int nArgs)
ListReturningFunction(MatrixFactoryI mf)
ListReturningFunction(MatrixFactoryI mf, int nArgs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
convertToList(java.util.List<java.lang.Object> list)
Convert the results to a list or vectorvoid
init(Jep jep)
Initialize the component.-
Methods inherited from class com.singularsys.jep.functions.NaryFunction
eval, run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance
-
Methods inherited from interface com.singularsys.extensions.matrix.MatrixFunctionI
calcDims
-
-
-
-
Field Detail
-
listFun
protected transient PostfixMathCommandI listFun
-
lp
protected transient ListProcessor lp
-
-
Constructor Detail
-
ListReturningFunction
public ListReturningFunction()
-
ListReturningFunction
public ListReturningFunction(MatrixFactoryI mf)
-
ListReturningFunction
public ListReturningFunction(int nArgs)
-
ListReturningFunction
public ListReturningFunction(MatrixFactoryI mf, int nArgs)
-
-
Method Detail
-
convertToList
public java.lang.Object convertToList(java.util.List<java.lang.Object> list) throws EvaluationException
Convert the results to a list or vector- Parameters:
list
- input list- Returns:
- either a VectorI or the result of the List pmfc from the Jep instance
- Throws:
EvaluationException
- on error
-
init
public void init(Jep jep)
Description copied from interface:JepComponent
Initialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.- Specified by:
init
in interfaceJepComponent
- Parameters:
jep
- the current Jep instance
-
-