|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.functions.ComplexFunction
public class ComplexFunction
Represents a complex-valued function of any number of complex arguments. A ComplexFunction
can only be created by a Parser
. This class has subclasses
ComplexExpression
, ComplexFunction1
, ComplexFunction2
, and ComplexFunction3
,
that represent functions of zero, one, two, and three arguments; the subclasses
exist only to provide more natural value()
methods that take the
expected number of arguments.
Parser.parseComplexFunction(String, String, String[])
Field Summary | |
---|---|
protected vmm.functions.ProgFunction |
func
|
Method Summary | |
---|---|
int |
getArity()
Gets the number of arguments that are required by this function. |
java.lang.String |
getName()
Gets the name of this function. |
void |
setName(java.lang.String name)
Changes the name of this function. |
Complex |
value(Complex[] argumentValues)
Finds the value of the function at a specified list of argument values, using an EvalStack that is unique to the current Thread, allowing evaluation in a thread-safe manner. |
Complex |
value(Complex[] argumentValues,
EvalStack stack)
Finds the value of the function at a specified list of argument values, using an EvalStack that is passed as a parameter. |
void |
value(Complex[] argumentValues,
EvalStack stack,
Complex answer)
Finds the value of the function at a specified list of argument values, using an EvalStack that is passed as a parameter, and place the answer in an existing Complex object. |
Complex |
value(double... arg)
Finds the value of the function at a specified list of argument values, using an EvalStack that is unique to the current Thread, allowing evaluation in a thread-safe manner. |
Complex |
value(double[] argumentValues,
EvalStack stack)
Finds the value of the function at a specified list of argument values, using an EvalStack that is passed as a parameter. |
void |
value(double[] argumentValues,
EvalStack stack,
Complex answer)
Finds the value of the function at a specified list of argument values, using an EvalStack that is passed as a parameter, and place the answer in an existing Complex object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected vmm.functions.ProgFunction func
Method Detail |
---|
public java.lang.String getName()
Parser.parseComplexFunction(String, String, String[])
and can be null.
public void setName(java.lang.String name)
public int getArity()
public Complex value(Complex[] argumentValues)
argumentValues
- the values of the arguments. The length of this array
must be the same as the number of arguments of the function. If the
function has arrity zero, then the argumentValues array can be null.
The Complex objects in this array must be non-null.public Complex value(double... arg)
arg
- the values of the arguments. The number of arguments passed
must be equal to the arity of the function multiplied by two. The real numbers
passed to this method are grouped into pairs to produce the complex arguements
that are passed to the function.public Complex value(Complex[] argumentValues, EvalStack stack)
argumentValues
- the values of the arguments. The length of this array
must be the same as the number of arguments of the function. If the
function has arrity zero, then the argumentValues array can be null.
The Complex objects in this array must be non-null.stack
- the EvalStack that is used for computing the value.public Complex value(double[] argumentValues, EvalStack stack)
argumentValues
- the values of the arguments. The length of the array
must be equal to the arity of the function multiplied by two. The real numbers
iin this array are grouped into pairs to produce the complex arguements
that are passed to the function.stack
- the EvalStack that is used for computing the value.public void value(Complex[] argumentValues, EvalStack stack, Complex answer)
argumentValues
- the values of the arguments. The length of this array
must be the same as the number of arguments of the function. If the
function has arrity zero, then the argumentValues array can be null.
The Complex objects in this array must be non-null.stack
- the EvalStack that is used for computing the value.answer
- the non-null Complex object where the value will be placedpublic void value(double[] argumentValues, EvalStack stack, Complex answer)
argumentValues
- the values of the arguments. The length of the array
must be equal to the arity of the function multiplied by two. The real numbers
iin this array are grouped into pairs to produce the complex arguements
that are passed to the function.stack
- the EvalStack that is used for computing the value.answer
- the non-null Complex object where the value will be placed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |