IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
A ScalarFunction class used as base class for dynamically loaded scalar functions. Functions loaded from scripts will inherit from this class, which enables script writers to assemble just the minimum necessary amount of code. More...
Public Member Functions | |
LoadableScalarFunctionBase () | |
Constructs reference scalar function of vector variable defined by the user (witout any transfomrations). | |
LoadableScalarFunctionBase (IAffineTransformation transf) | |
Constructs a scalar function of vector argument defined by the user defined function and affine transformation of parameters. | |
override double | ReferenceValue (IVector parameters) |
Returns the value of this function at the specified parameter in the reference coordinate system. | |
override void | ReferenceGradientPlain (IVector parameters, IVector gradient) |
Calculates the first derivative (gradient) of this function at the specified parameter in the reference coordinate system. | |
override void | ReferenceHessianPlain (IVector parameters, IMatrix hessian) |
Calculates the second derivative (Hessian) of this function at the specified parameters in the reference coordinate system. | |
Protected Member Functions | |
abstract void | InitDynamic () |
Initialization of variables that are used by dynamic loading mechanisim. This function must be overridden in derived classes. | |
Protected Attributes | |
string[] | _independentVariableNames = null |
string | _returnedValueName = null |
string[] | _gradientDefinitionStrings = null |
string[][] | _hessianDefinitionStrings = null |
int | _numParam |
bool | _valueDefined = false |
Properties | |
virtual int | NumParameters [get] |
Gets number of parameters of the current user defined scalar function. | |
override string | Name [get, set] |
Function name. | |
override string | Description [get, set] |
Function description. | |
override bool | ValueDefined [get, set] |
Whether calculation of value is implemented for the current scalar function. | |
override bool | GradientDefined [get, set] |
Whether calculation of gradient is implemeted for the current scalar function. | |
override bool | HessianDefined [get, set] |
Whether calculation of second derivative is implemented for the current function. | |
Private Attributes | |
string | _functionArgumentParametersName = null |
string | _functionArgumentGradientName = null |
string | _functionArgumentHessianName = null |
string | _independentVariableName = null |
string | _valueDefinitionString = null |
bool | _gradientDefined = false |
bool | _hessianDefined = false |
A ScalarFunction class used as base class for dynamically loaded scalar functions. Functions loaded from scripts will inherit from this class, which enables script writers to assemble just the minimum necessary amount of code.
$A Igor Jun10;
IG::Lib::LoadableScalarFunctionBase::LoadableScalarFunctionBase | ( | ) | [inline] |
Constructs reference scalar function of vector variable defined by the user (witout any transfomrations).
IG::Lib::LoadableScalarFunctionBase::LoadableScalarFunctionBase | ( | IAffineTransformation | transf | ) | [inline] |
Constructs a scalar function of vector argument defined by the user defined function and affine transformation of parameters.
transf | Affine transformation that is applied to parameters. If null then the fuction is identical to the reference (untransformed) user-defined function. |
$A Igor Sep10;
abstract void IG::Lib::LoadableScalarFunctionBase::InitDynamic | ( | ) | [protected, pure virtual] |
Initialization of variables that are used by dynamic loading mechanisim. This function must be overridden in derived classes.
Implemented in IG::Script::ScritpScalarFunctionExample::Container::Function.
override double IG::Lib::LoadableScalarFunctionBase::ReferenceValue | ( | IVector | parameters | ) | [inline, virtual] |
Returns the value of this function at the specified parameter in the reference coordinate system.
parameters | Vector of parameters (in the REFERENCE system) where function is evaluated. |
Implements IG::Num::ScalarFunctionBase.
Reimplemented in IG::Script::ScritpScalarFunctionExample::Container::Function.
override void IG::Lib::LoadableScalarFunctionBase::ReferenceGradientPlain | ( | IVector | parameters, |
IVector | gradient | ||
) | [inline, virtual] |
Calculates the first derivative (gradient) of this function at the specified parameter in the reference coordinate system.
parameters | Vector of parameters (in the REFERENCE system) where derivatives are evaluated. |
gradient | Vector where first derivatives (gradient) are stored. |
Implements IG::Num::ScalarFunctionBase.
Reimplemented in IG::Script::ScritpScalarFunctionExample::Container::Function.
override void IG::Lib::LoadableScalarFunctionBase::ReferenceHessianPlain | ( | IVector | parameters, |
IMatrix | hessian | ||
) | [inline, virtual] |
Calculates the second derivative (Hessian) of this function at the specified parameters in the reference coordinate system.
parameters | Vector of parameters (in the REFERENCE system) where Hessian is evaluated. |
hessian | Matrix where second derivatives (Hessian) are stored. |
Implements IG::Num::ScalarFunctionBase.
Reimplemented in IG::Script::ScritpScalarFunctionExample::Container::Function.
string [] IG::Lib::LoadableScalarFunctionBase::_independentVariableNames = null [protected] |
string IG::Lib::LoadableScalarFunctionBase::_returnedValueName = null [protected] |
string IG::Lib::LoadableScalarFunctionBase::_functionArgumentParametersName = null [private] |
string IG::Lib::LoadableScalarFunctionBase::_functionArgumentGradientName = null [private] |
string IG::Lib::LoadableScalarFunctionBase::_functionArgumentHessianName = null [private] |
string IG::Lib::LoadableScalarFunctionBase::_independentVariableName = null [private] |
string IG::Lib::LoadableScalarFunctionBase::_valueDefinitionString = null [private] |
string [] IG::Lib::LoadableScalarFunctionBase::_gradientDefinitionStrings = null [protected] |
string [][] IG::Lib::LoadableScalarFunctionBase::_hessianDefinitionStrings = null [protected] |
int IG::Lib::LoadableScalarFunctionBase::_numParam [protected] |
bool IG::Lib::LoadableScalarFunctionBase::_valueDefined = false [protected] |
bool IG::Lib::LoadableScalarFunctionBase::_gradientDefined = false [private] |
bool IG::Lib::LoadableScalarFunctionBase::_hessianDefined = false [private] |
virtual int IG::Lib::LoadableScalarFunctionBase::NumParameters [get] |
Gets number of parameters of the current user defined scalar function.
override string IG::Lib::LoadableScalarFunctionBase::Name [get, set] |
Function name.
Reimplemented from IG::Num::ScalarFunctionUntransformedBase.
override string IG::Lib::LoadableScalarFunctionBase::Description [get, set] |
Function description.
Reimplemented from IG::Num::ScalarFunctionUntransformedBase.
override bool IG::Lib::LoadableScalarFunctionBase::ValueDefined [get, set] |
Whether calculation of value is implemented for the current scalar function.
Reimplemented from IG::Num::ScalarFunctionUntransformedBase.
override bool IG::Lib::LoadableScalarFunctionBase::GradientDefined [get, set] |
Whether calculation of gradient is implemeted for the current scalar function.
Reimplemented from IG::Num::ScalarFunctionUntransformedBase.
override bool IG::Lib::LoadableScalarFunctionBase::HessianDefined [get, set] |
Whether calculation of second derivative is implemented for the current function.
Reimplemented from IG::Num::ScalarFunctionUntransformedBase.