|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthep.aida.ref.event.AIDAObservable
hep.aida.ref.ManagedObject
hep.aida.ref.function.AbstractIFunction
public abstract class AbstractIFunction
AbstractIFunction is implementation of the IFunction. User has to implement "value" method.
| Constructor Summary | |
|---|---|
AbstractIFunction()
No-argument constructor to be used for cloning. |
|
AbstractIFunction(String[] variableNames,
String[] parameterNames)
Creates a new instance of AbstractIFunction with specified variable and parameter names. |
|
AbstractIFunction(String title,
int dimension,
int numberOfParameters)
Creates a new instance of AbstractIFunction with default variable names (x0, x1, ...) and default parameter names (p0, p1, ...) |
|
AbstractIFunction(String title,
String[] variableNames,
String[] parameterNames)
|
|
| Method Summary | |
|---|---|
void |
addFunctionListener(FunctionListener listener)
|
IAnnotation |
annotation()
|
Object |
clone()
|
String |
codeletString()
String describing the metatype and implementation of the function. |
int |
dimension()
Dimensionality of the domain space. |
void |
excludeNormalizationAll()
Set empty range in all axes. |
double[] |
gradient(double[] values)
Gradient of the function. |
void |
includeNormalizationAll()
Set full range in all axes. |
int |
indexOfParameter(String str)
Return -1 if parameter not found (name undefined). |
boolean |
isEqual(IFunction iFunction)
Compare if functions are the same. |
boolean |
isNormalized()
Return true if normalization is currently switched on. |
String |
normalizationParameter()
Returns the name of the normalization parameter if the function has one. |
IRangeSet |
normalizationRange(int iAxis)
Set the normalization range from -inf to +inf in the i-th axis (dimension). |
void |
normalize(boolean param)
Normalize by internally adjusting some of the parameters. |
int |
numberOfParameters()
Number of parameters. |
double |
parameter(String str)
|
double[] |
parameterGradient(double[] values)
Compute gradient with respect to parameters. |
String[] |
parameterNames()
Names of paramaters. |
double[] |
parameters()
Retrieve current vector of parameters. |
boolean |
providesGradient()
Determine whether function is able to compute gradient. |
boolean |
providesNormalization()
|
boolean |
providesParameterGradient()
Return true if provides parameter gradient. |
void |
removeFunctionListener(FunctionListener listener)
|
void |
setCodeletString(String str)
|
void |
setParameter(String str,
double param)
Set parameter's value by name. |
void |
setParameters(double[] pars)
Set new vector of parameters. |
void |
setTitle(String title)
Set the histogram title. |
String |
title()
Get the Function's title. |
abstract double |
value(double[] v)
Provide value for your function here. |
String |
variableName(int index)
Get the symbolic name of i-th variable. |
String[] |
variableNames()
Get all the names in a vector. |
| Methods inherited from class hep.aida.ref.ManagedObject |
|---|
isFillable, name, setFillable, setName, type, typeForClass |
| Methods inherited from class hep.aida.ref.event.AIDAObservable |
|---|
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hep.aida.ref.event.Connectable |
|---|
isConnected, setConnected |
| Constructor Detail |
|---|
public AbstractIFunction()
public AbstractIFunction(String title,
int dimension,
int numberOfParameters)
public AbstractIFunction(String[] variableNames,
String[] parameterNames)
public AbstractIFunction(String title,
String[] variableNames,
String[] parameterNames)
| Method Detail |
|---|
public Object clone()
clone in class Objectpublic void setCodeletString(String str)
public abstract double value(double[] v)
value in interface IFunctionpublic boolean providesGradient()
IFunction
providesGradient in interface IFunctionpublic double[] gradient(double[] values)
IFunction
gradient in interface IFunctionpublic String codeletString()
IFunction
codeletString in interface IFunctionpublic IAnnotation annotation()
annotation in interface IFunctionpublic int dimension()
IFunction
dimension in interface IFunctionpublic int indexOfParameter(String str)
IFunction
indexOfParameter in interface IFunctionpublic int numberOfParameters()
IFunction
numberOfParameters in interface IFunctionpublic double parameter(String str)
parameter in interface IFunctionpublic String[] parameterNames()
IFunction
parameterNames in interface IFunctionpublic double[] parameters()
IFunction
parameters in interface IFunction
public void setParameter(String str,
double param)
throws IllegalArgumentException
IFunction
setParameter in interface IFunctionstr - The name of the parameter.param - The new value of the parameter.
IllegalArgumentException - If name does not correspond to a parameter.
public void setParameters(double[] pars)
throws IllegalArgumentException
IFunction
setParameters in interface IFunctionIllegalArgumentException
public void setTitle(String title)
throws IllegalArgumentException
IFunction
setTitle in interface IFunctiontitle - The title.
IllegalArgumentExceptionpublic String title()
IFunction
title in interface IFunctionpublic String variableName(int index)
IFunction
variableName in interface IFunctionpublic String[] variableNames()
IFunction
variableNames in interface IFunctionpublic void excludeNormalizationAll()
IModelFunction
excludeNormalizationAll in interface IModelFunctionpublic void includeNormalizationAll()
IModelFunction
includeNormalizationAll in interface IModelFunctionpublic boolean isNormalized()
IModelFunction
isNormalized in interface IModelFunctionpublic IRangeSet normalizationRange(int iAxis)
IModelFunction
normalizationRange in interface IModelFunctionpublic void normalize(boolean param)
IModelFunction
normalize in interface IModelFunctionpublic double[] parameterGradient(double[] values)
IModelFunction
parameterGradient in interface IModelFunctionpublic boolean providesNormalization()
providesNormalization in interface IModelFunctionpublic boolean providesParameterGradient()
IModelFunction
providesParameterGradient in interface IModelFunctionpublic String normalizationParameter()
IFunction
normalizationParameter in interface IFunctionpublic boolean isEqual(IFunction iFunction)
IFunction
isEqual in interface IFunctionpublic void addFunctionListener(FunctionListener listener)
addFunctionListener in interface FunctionDispatcherpublic void removeFunctionListener(FunctionListener listener)
removeFunctionListener in interface FunctionDispatcher
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||