|
FreeHEP API Version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Principal user-level function interface. Function is a self contained object, which remembers the current value of its parameters which are simple doubles. IFunction may be directly plotted or fitted. The standard convention of referring to variables by name: "x[0]" corresponds to variable number 0 etc.
Method Summary | |
IAnnotation |
annotation()
|
String |
codeletString()
String describing the metatype and implementation of the function. |
int |
dimension()
Dimensionality of the domain space. |
double[] |
gradient(double[] x)
Gradient of the function. |
int |
indexOfParameter(String name)
Return -1 if parameter not found (name undefined). |
boolean |
isEqual(IFunction f)
Compare if functions are the same. |
int |
numberOfParameters()
Number of parameters. |
double |
parameter(String name)
|
String[] |
parameterNames()
Names of paramaters. |
double[] |
parameters()
Retrieve current vector of parameters. |
boolean |
providesGradient()
Determine whether function is able to compute gradient. |
void |
setParameter(String name,
double x)
Set parameter's value by name. |
void |
setParameters(double[] params)
Set new vector of parameters. |
double |
value(double[] x)
Scalar value of the function. |
String |
variableName(int i)
Get the symbolic name of i-th variable. |
String[] |
variableNames()
Get all the names in a vector. |
Method Detail |
public double value(double[] x)
public int dimension()
public boolean isEqual(IFunction f)
public double[] gradient(double[] x)
public boolean providesGradient()
public String variableName(int i)
public String[] variableNames()
public void setParameters(double[] params)
public double[] parameters()
public int numberOfParameters()
public String[] parameterNames()
public void setParameter(String name, double x) throws IllegalArgumentException
name
- The name of the parameter.x
- The new value of the parameter.
IllegalArgumentException
- If name does not correspond to a parameter.public double parameter(String name)
public int indexOfParameter(String name)
public IAnnotation annotation()
public String codeletString()
|
FreeHEP API Version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |