IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Base class for scalar functions of 2 variables (base for implementation of IFunc2d interface). Derive from this class when your basic implementations of evaluation methods are in vector form (parameters as vec2 struct).Beside the IFunc2d interface, this class also implements the IScalarFunction interface. This does not affect efficiency but adds the functionality for using objects as general (untransformed) scalar functions. More...
Public Member Functions | |
Func2dVectorFormBase () | |
Constructor. | |
override double | Value (vec2 parameters) |
Calculates and returns value of the current 2D scalar function. This method must be overridden in derives classes. | |
override vec2 | Gradient (vec2 parameters) |
Calculates and returns gradient of the current 2D scalar function. This method must be overridden in derives classes where calculation of function gradient is implemented. | |
override mat2 | Hessian (vec2 parameters) |
Calculates and returns Hessian of the current 2D scalar function and returns it (in the form of a mat2 struct). This method must be overridden in derives classes where calculation of function Hessian is implemented. | |
sealed override double | Value (double x, double y) |
Calculates and returns value of the current 2D scalar function. | |
sealed override void | Gradient (double x, double y, out double gradx, out double grady) |
Calculates gradient of the current 2D scalar function and returns its components through the specified output variables. | |
sealed override void | Hessian (double x, double y, out double dxx, out double dyy, out double dxy) |
Calculates Hessian of the current 3D scalar function and returns its component through the specified output variables. |
Base class for scalar functions of 2 variables (base for implementation of IFunc2d interface).
Derive from this class when your basic implementations of evaluation methods are in vector form (parameters as vec2 struct).
Beside the IFunc2d interface, this class also implements the IScalarFunction interface. This does not affect efficiency but adds the functionality for using objects as general (untransformed) scalar functions.
$A Igor Aug09;
IG::Num::Func2dVectorFormBase::Func2dVectorFormBase | ( | ) | [inline] |
Constructor.
override double IG::Num::Func2dVectorFormBase::Value | ( | vec2 | parameters | ) | [inline] |
Calculates and returns value of the current 2D scalar function. This method must be overridden in derives classes.
Implements IG::Num::IFunc2d.
Reimplemented in IG::Num::Func2dLinear, and IG::Num::Func2dQuadratic.
Calculates and returns gradient of the current 2D scalar function. This method must be overridden in derives classes where calculation of function gradient is implemented.
<returnreturns>Gradient of the current 2D scalar function (in form of the vec2 struct)</returnreturns>
Implements IG::Num::IFunc2d.
Reimplemented in IG::Num::Func2dLinear, and IG::Num::Func2dQuadratic.
Calculates and returns Hessian of the current 2D scalar function and returns it (in the form of a mat2 struct). This method must be overridden in derives classes where calculation of function Hessian is implemented.
Implements IG::Num::IFunc2d.
Reimplemented in IG::Num::Func2dLinear, and IG::Num::Func2dQuadratic.
sealed override double IG::Num::Func2dVectorFormBase::Value | ( | double | x, |
double | y | ||
) | [inline] |
Calculates and returns value of the current 2D scalar function.
x | First parameter. |
y | Second parameter. |
z | Third parameter. |
Implements IG::Num::IFunc2d.
sealed override void IG::Num::Func2dVectorFormBase::Gradient | ( | double | x, |
double | y, | ||
out double | gradx, | ||
out double | grady | ||
) | [inline] |
Calculates gradient of the current 2D scalar function and returns its components through the specified output variables.
x | First parameter. |
y | Second parameter. |
gradx | First component of the returned gradient. |
grady | Second component of the returned gradient. |
gradz | Third component of the returned gradient. |
Implements IG::Num::IFunc2d.
sealed override void IG::Num::Func2dVectorFormBase::Hessian | ( | double | x, |
double | y, | ||
out double | dxx, | ||
out double | dyy, | ||
out double | dxy | ||
) | [inline] |
Calculates Hessian of the current 3D scalar function and returns its component through the specified output variables.
x | First parameter. |
y | Second parameter. |
dxx | Component 1-1 of the calculated Hessian. |
dyy | Component 2-2 of the calculated Hessian. |
dxy | Component 1-2 of the calculated Hessian. |
Implements IG::Num::IFunc2d.