public abstract class AbstractFunction extends Object implements Function
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
fparameter |
protected double[] |
fparameterCopy |
protected boolean[] |
fparameterFixed |
protected double[] |
fparameterMax |
protected double[] |
fparameterMin |
protected String[] |
fparameterName |
protected boolean |
isFitterMode |
| Constructor and Description |
|---|
AbstractFunction(String name,
double[] parameter) |
AbstractFunction(String name,
double[] parameters,
String[] parameterNames) |
AbstractFunction(String name,
int nparm) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFunction(Function object)
add object to global function list
|
void |
addListener(UpdateListener object)
add object to update listener list
|
void |
clearParameterValues()
resets all parameter values to zero
|
void |
fixParameter(int id,
boolean state)
sets
|
int |
getFreeParameterCount() |
Function[] |
getFunctions() |
String |
getID() |
String |
getName() |
int |
getParameterCount() |
String |
getParameterName(int id) |
double |
getParameterRangeMaximum(int id) |
double |
getParameterRangeMinimum(int id) |
double |
getParameterValue(int id) |
double[] |
getParameterValues()
a convenience method to return all parameter values
|
void |
invokeListener()
invoke object within update listener list
|
boolean |
isFitterMode()
returns whether function is in use by fitting routine <expert function>
|
boolean |
isParameterFixed(int id)
returns whether given parameter is fixed (static) or not
|
void |
printParameters() |
void |
printParameters(boolean fullDebug) |
void |
removeFunction(Function object)
remove object to global function list
|
void |
removeListener(UpdateListener object)
remove object to update listener list
|
void |
setFitterMode(boolean state)
sets whether function is in use by fitting routine <expert function>
|
void |
setParameterCount(int count) |
void |
setParameterName(int id,
String paramName)
sets the name of a by 'id' given parameter
|
void |
setParameterRange(int id,
double minRange,
double maxRange)
sets the range of a by 'id' given parameter N.B.
|
void |
setParameterValue(int id,
double value)
sets the value of a by 'id' given parameter
|
void |
setParameterValues(double[] value)
sets the parameter values using an array the array is required to have at most getParameterCount() indices
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputDimension, getOutputDimensionprotected double[] fparameter
protected double[] fparameterMin
protected double[] fparameterMax
protected double[] fparameterCopy
protected boolean[] fparameterFixed
protected String[] fparameterName
protected boolean isFitterMode
public AbstractFunction(String name, double[] parameter)
name - function nameparameter - parameter vectorpublic AbstractFunction(String name, double[] parameters, String[] parameterNames)
name - function nameparameters - parameter arrayparameterNames - parameter name arraypublic AbstractFunction(String name, int nparm)
name - function namenparm - number of free parameterpublic void addFunction(Function object)
object - function to be addedpublic void addListener(UpdateListener object)
object - update listener to be addedpublic void clearParameterValues()
FunctionclearParameterValues in interface Functionpublic void fixParameter(int id,
boolean state)
FunctionfixParameter in interface Functionid - the parameter idstate - true: parameter is fixed, false: parameter is freepublic int getFreeParameterCount()
getFreeParameterCount in interface Functionpublic Function[] getFunctions()
public String getName()
public int getParameterCount()
getParameterCount in interface Functionpublic String getParameterName(int id)
getParameterName in interface Functionid - the parameter idpublic double getParameterRangeMaximum(int id)
getParameterRangeMaximum in interface Functionid - the parameter idpublic double getParameterRangeMinimum(int id)
getParameterRangeMinimum in interface Functionid - the parameter idpublic double getParameterValue(int id)
getParameterValue in interface Functionid - parameter idpublic double[] getParameterValues()
public void invokeListener()
public boolean isFitterMode()
FunctionisFitterMode in interface Functionpublic boolean isParameterFixed(int id)
FunctionisParameterFixed in interface Functionid - parameter idpublic void printParameters()
public void printParameters(boolean fullDebug)
public void removeFunction(Function object)
object - function to be removedpublic void removeListener(UpdateListener object)
object - update listener to be removedpublic void setFitterMode(boolean state)
FunctionsetFitterMode in interface Functionstate - true: function is used within a fitting routinepublic void setParameterCount(int count)
setParameterCount in interface Functioncount - number of free parameterpublic void setParameterName(int id,
String paramName)
FunctionsetParameterName in interface Functionid - the parameter idparamName - name for the given pararameter 'id'public void setParameterRange(int id,
double minRange,
double maxRange)
FunctionsetParameterRange in interface Functionid - the parameter idminRange - minimum parameter rangemaxRange - maximum parameter rangepublic void setParameterValue(int id,
double value)
FunctionsetParameterValue in interface Functionid - the parameter idvalue - new value of parameterpublic void setParameterValues(double[] value)
FunctionsetParameterValues in interface Functionvalue - new parameter valuesCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.