|
AIDA API Version 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An IFunction is a lowest level function. An IFunction is meant to be plotted or used for fitting. An IFunction does not provide neither the gradient with respect to the parameters, nor the normalization. This means that when used for fitting such quantities will have to be evaluated numerically, reducing the performance of the fit. For higher performance fitting an IModelFunction should be used. All the IFunctions provided by a given implementations should also be IModelFunctions. If a user is to define and implement a function the choice between an IFunction and an IModelFunction should be dictated by its use and desired performance during fitting. An IFunction is a self contained object, which remembers the current value of its parameters which are simple doubles. 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. |
String |
normalizationParameter()
Returns the name of the normalization parameter if the function has one. |
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. |
void |
setTitle(String title)
Set the histogram title. |
String |
title()
Get the Function's title. |
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 String title()
public void setTitle(String title) throws IllegalArgumentException
title
- The title.
IllegalArgumentEception
- If title cannot be changed.
IllegalArgumentException
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) throws IllegalArgumentException
IllegalArgumentException
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()
public String normalizationParameter()
|
AIDA API Version 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |