|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.UserExhibit.FunctionInfo
public static class UserExhibit.FunctionInfo
An object of type FunctionInfo holds information about one the functions, to be entered
by the user, that compute the data for the user exhibit. An object of type
FunctionInfo is created by the methods UserExhibit.Support.addRealFunction(String, String, String[])
and UserExhibit.Support.addComplexFunction(String, String, String[])
; it is not possible to
create an object of this type directly.
A FunctionInfo object contains either a real-valued function, of type
Function
, or a complex-valued function, of type ComplexFunction
,
depending on which method created it.
Method Summary | |
---|---|
Complex |
complexFunctionValue(Complex... arg)
Returns the value of the complex-valued function contained in this FunctionInfo object, at a specified list of input arguments for the functions. |
Complex |
complexFunctionValue(double... arg)
Returns the value of the complex-valued function contained in this FunctionInfo object, at a specified list of input arguments for the functions. |
java.lang.String[] |
getArgumentNames()
Returns the names of the arguments to the function, as specified in the parameter list of UserExhibit.Support.addRealFunction(String, String, String[]) or
UserExhibit.Support.addComplexFunction(String, String, String[]) when this
FunctionInfo object was created. |
ComplexFunction |
getComplexFunction()
Returns the complex-valued function contained in this FunctionInfo object, or returns null if no function has been created yet. |
java.lang.String |
getDefinition()
Returns the names of the arguments to the function, as entered by the user. |
boolean |
getIsComplex()
Tells whether the function is complex-valued or real-valued. |
java.lang.String |
getName()
Returns the name of the function, as specified in the parameter list of UserExhibit.Support.addRealFunction(String, String, String[]) or
UserExhibit.Support.addComplexFunction(String, String, String[]) when this
FunctionInfo object was created. |
Function |
getRealFunction()
Returns the real-valued function contained in this FunctionInfo object, or returns null if no function has been created yet. |
double |
realFunctionValue(double... arg)
Returns the value of the real-valued function contained in this FunctionInfo object, at a specified list of input arguments for the functions. |
void |
setPrompt(java.lang.String prompt)
Set the label to be used next to the text fiels in the dialog box where the user enters the definition of the fuction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public double realFunctionValue(double... arg)
UserExhibit.Support.addRealFunction(String, String, String[])
.
java.lang.ClassCastException
- if the function is complex-valued, not real-valued
java.lang.IllegalArgumentException
- if the number of arguments does not match the arity of the functionpublic Complex complexFunctionValue(Complex... arg)
UserExhibit.Support.addComplexFunction(String, String, String[])
.
java.lang.ClassCastException
- if the function is real-valued, not complex-valued
java.lang.IllegalArgumentException
- if the number of arguments does not match the arity of the functionpublic Complex complexFunctionValue(double... arg)
UserExhibit.Support.addComplexFunction(String, String, String[])
.
That is, complexFunctionValue(re1,im1,re2,im2...)
is equivalent to
complexFunction(new Complex(re1,im1), new Complex(re2,im2)...)
- Throws:
java.lang.ClassCastException
- if the function is real-valued, not complex-valued
java.lang.IllegalArgumentException
- if the number of arguments is not equal to the
arity of the function multiplied by two.
public Function getRealFunction()
UserExhibit.Support.showChangeDialog(Display, View)
is called.} This means that you should ordinarily not keep a copy of the value returned by
this method, and that there is generally little reason to use it. Note that
if the arity of the fucntion is 1, 2, or 3, then the return value will actuall be
of type Function1
, Function2
, or Function3
.
java.lang.ClassCastException
- if the function is complex-valued, not real-valued.public ComplexFunction getComplexFunction()
UserExhibit.Support.showChangeDialog(Display, View)
is called.} This means that you should ordinarily not keep a copy of the value returned by
this method, and that there is generally little reason to use it. Note that
if the arity of the fucntion is 1, 2, or 3, then the return value will actuall be
of type ComplexFunction1
, ComplexFunction2
, or ComplexFunction3
.
java.lang.ClassCastException
- if the function is real-valued, not complex-valued.public java.lang.String[] getArgumentNames()
UserExhibit.Support.addRealFunction(String, String, String[])
or
UserExhibit.Support.addComplexFunction(String, String, String[])
when this
FunctionInfo object was created.
public java.lang.String getDefinition()
public boolean getIsComplex()
public java.lang.String getName()
UserExhibit.Support.addRealFunction(String, String, String[])
or
UserExhibit.Support.addComplexFunction(String, String, String[])
when this
FunctionInfo object was created.
public void setPrompt(java.lang.String prompt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |