|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hep.aida.ref.pdf.Variable hep.aida.ref.pdf.Function
Base function. Any function should extend this class.
Field Summary |
Fields inherited from class hep.aida.ref.pdf.Variable |
DEPENDENT, FUNCTION, PARAMETER |
Constructor Summary | |
Function(String name)
|
Method Summary | |
void |
addFunctionListener(FunctionListener listener)
|
void |
addVariable(Variable v)
Variables Management. |
void |
addVariables(VariableList list)
|
hep.aida.IAnnotation |
annotation()
|
String |
codeletString()
|
int |
dimension()
|
double |
evaluateAnalyticalNormalization(Dependent dep)
|
double |
evaluateAnalyticalVariableGradient(Variable var)
To be overwritten by classes extending Function. |
void |
excludeNormalizationAll()
|
double |
functionMaxValue()
This method is used to generate toy Mc data sets. |
double |
functionValue()
|
double |
functionValue(double[] v)
|
Dependent |
getDependent(int index)
|
Dependent |
getDependent(String parName)
|
Parameter |
getNormalizationParameter()
The normalization Parameter for a function is ALWAYS the last one. |
Parameter |
getParameter(int index)
|
Parameter |
getParameter(String parName)
|
double[] |
gradient()
|
double[] |
gradient(double[] v)
|
boolean |
hasAnalyticalNormalization(Dependent dep)
To be overwritten if Function provides analytical normalization. |
boolean |
hasAnalyticalVariableGradient(Variable var)
To be overwritten by classes extending Function. |
protected boolean |
hasDependent(Dependent dep)
|
protected boolean |
hasParameter(Parameter par)
|
protected boolean |
hasVariable(Variable var)
|
void |
includeNormalizationAll()
|
int |
indexOfParameter(String parName)
|
boolean |
isComposite(Variable var)
|
boolean |
isEqual(hep.aida.IFunction iFunction)
|
boolean |
isNormalized()
|
protected double |
maxValue()
|
String |
normalizationParameter()
|
hep.aida.IRangeSet |
normalizationRange(int i)
|
void |
normalizationRangeChanged()
|
void |
normalize(boolean normalize)
|
protected void |
notifyFunctionChanged(FunctionChangedEvent event)
|
int |
numberOfDependents()
|
int |
numberOfParameters()
|
double |
parameter(String parName)
|
double[] |
parameterGradient()
|
double[] |
parameterGradient(double[] v)
|
String[] |
parameterNames()
|
double[] |
parameters()
|
boolean |
providesGradient()
|
boolean |
providesGradientWithRespectToVariable(Variable var)
|
boolean |
providesNormalization()
|
boolean |
providesParameterGradient()
|
void |
removeFunctionListener(FunctionListener listener)
|
void |
setCodeletString(String str)
|
void |
setNormalizationParamter(Parameter par)
|
void |
setParameter(String parName,
double parValue)
|
void |
setParameters(double[] pars)
|
void |
setTitle(String title)
|
void |
setValue(double value)
Set the current value. |
protected void |
setVariableValue(double value)
|
String |
title()
|
protected void |
updateNormalization()
|
double |
value()
Get the current value. |
double |
value(double[] v)
|
void |
variableChanged(Variable var)
This method is invoked when a variable in the function has changed its value. |
void |
variableChangedName(Variable var)
Method invoked when the Variable's name have changed. |
void |
variableChangedRange(Variable var)
Method invoked when the Variable's range have changed. |
void |
variableChangedUnits(Variable var)
Method invoked when the Variable's Units have changed. |
void |
variableChangedValue(Variable var)
Method invoked when the Variable's value have changed. |
boolean |
variableChangingName(Variable var,
String name)
Method invoked when the Variable's name is about to change. |
boolean |
variableChangingUnits(Variable var,
Units units)
Method invoked when the Variable's Units are about to change. |
boolean |
variableChangingValue(Variable var,
double value)
Method invoked when the Variable's value is about to change. |
String |
variableName(int index)
|
String[] |
variableNames()
|
Methods inherited from class hep.aida.ref.pdf.Variable |
addVariableListener, name, removeVariableListener, setName, setUnits, type, units |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Function(String name)
Method Detail |
public void addVariable(Variable v)
public void addVariables(VariableList list)
protected boolean hasDependent(Dependent dep)
protected boolean hasParameter(Parameter par)
protected boolean hasVariable(Variable var)
public boolean variableChangingUnits(Variable var, Units units)
VariableListener
variableChangingUnits
in interface VariableListener
var
- The Variable whose Units are changing.units
- The new Units for the Variable.
true
if the change is allowed.public void variableChangedUnits(Variable var)
VariableListener
variableChangedUnits
in interface VariableListener
var
- The Variable whose Units have changed.public boolean variableChangingValue(Variable var, double value)
VariableListener
variableChangingValue
in interface VariableListener
var
- The Variable whose value is changing.value
- The new value for the Variable.
true
if the change is allowed.public String normalizationParameter()
normalizationParameter
in interface hep.aida.IFunction
public void variableChanged(Variable var)
public void variableChangedValue(Variable var)
VariableListener
variableChangedValue
in interface VariableListener
var
- The Variable whose value have changed.public boolean variableChangingName(Variable var, String name)
VariableListener
variableChangingName
in interface VariableListener
var
- The Variable whose name is changing.name
- The new name for the Variable.
true
if the change is allowed.public void variableChangedName(Variable var)
VariableListener
variableChangedName
in interface VariableListener
var
- The Variable whose name has changed.public void setValue(double value)
HasValue
setValue
in interface HasValue
setValue
in class Variable
public double functionValue()
public double functionMaxValue()
protected void updateNormalization()
public boolean hasAnalyticalNormalization(Dependent dep)
public double evaluateAnalyticalNormalization(Dependent dep)
protected double maxValue()
public double value()
HasValue
value
in interface HasValue
value
in class Variable
public double evaluateAnalyticalVariableGradient(Variable var)
public boolean hasAnalyticalVariableGradient(Variable var)
public boolean providesGradientWithRespectToVariable(Variable var)
public double[] gradient()
public double[] parameterGradient()
public Parameter getParameter(int index)
public Parameter getParameter(String parName)
public int numberOfParameters()
numberOfParameters
in interface hep.aida.IFunction
public Dependent getDependent(int index)
public Dependent getDependent(String parName)
public int numberOfDependents()
public boolean isComposite(Variable var)
public Parameter getNormalizationParameter()
public void setNormalizationParamter(Parameter par)
public void addFunctionListener(FunctionListener listener)
addFunctionListener
in interface FunctionDispatcher
public void removeFunctionListener(FunctionListener listener)
removeFunctionListener
in interface FunctionDispatcher
protected void notifyFunctionChanged(FunctionChangedEvent event)
public void variableChangedRange(Variable var)
VariableListener
variableChangedRange
in interface VariableListener
var
- The Variable whose range has changed.public void normalizationRangeChanged()
public boolean isNormalized()
isNormalized
in interface hep.aida.IModelFunction
public void normalize(boolean normalize)
normalize
in interface hep.aida.IModelFunction
public boolean providesNormalization()
providesNormalization
in interface hep.aida.IModelFunction
public hep.aida.IAnnotation annotation()
annotation
in interface hep.aida.IFunction
public String codeletString()
codeletString
in interface hep.aida.IFunction
public void setCodeletString(String str)
public double value(double[] v)
value
in interface hep.aida.IFunction
public double[] gradient(double[] v)
gradient
in interface hep.aida.IFunction
public int dimension()
dimension
in interface hep.aida.IFunction
public int indexOfParameter(String parName)
indexOfParameter
in interface hep.aida.IFunction
public double parameter(String parName)
parameter
in interface hep.aida.IFunction
public String[] parameterNames()
parameterNames
in interface hep.aida.IFunction
public double[] parameters()
parameters
in interface hep.aida.IFunction
public void setParameter(String parName, double parValue) throws IllegalArgumentException
setParameter
in interface hep.aida.IFunction
IllegalArgumentException
public void setParameters(double[] pars) throws IllegalArgumentException
setParameters
in interface hep.aida.IFunction
IllegalArgumentException
public void setTitle(String title) throws IllegalArgumentException
setTitle
in interface hep.aida.IFunction
IllegalArgumentException
public String title()
title
in interface hep.aida.IFunction
public String variableName(int index)
variableName
in interface hep.aida.IFunction
public String[] variableNames()
variableNames
in interface hep.aida.IFunction
public double functionValue(double[] v)
public void excludeNormalizationAll()
excludeNormalizationAll
in interface hep.aida.IModelFunction
public void includeNormalizationAll()
includeNormalizationAll
in interface hep.aida.IModelFunction
public hep.aida.IRangeSet normalizationRange(int i)
normalizationRange
in interface hep.aida.IModelFunction
public double[] parameterGradient(double[] v)
parameterGradient
in interface hep.aida.IModelFunction
public boolean isEqual(hep.aida.IFunction iFunction)
isEqual
in interface hep.aida.IFunction
public boolean providesGradient()
providesGradient
in interface hep.aida.IFunction
public boolean providesParameterGradient()
providesParameterGradient
in interface hep.aida.IModelFunction
protected void setVariableValue(double value)
setVariableValue
in class Variable
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |