IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Base class for scalar functions of 2 variables. This willl be base class for most of other classes that implement the IFunc2d interface. It provides a set of useful static methods. More...
Public Member Functions | |
Func2dBasePlain_ToConsider () | |
Constructor. | |
abstract double | Value (double x, double y) |
Calculates and returns value of the current 2D scalar function. | |
virtual double | Value (vec2 parameters) |
Calculates and returns value of the current 2D scalar function. | |
abstract 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. | |
virtual vec2 | Gradient (vec2 parameters) |
Calculates and returns gradient of the current 2D scalar function. | |
abstract void | Hessian (double x, double y, out double dxx, out double dyy, out double dxy) |
Calculates Hessian of the current 2D scalar function and returns its component through the specified output variables. | |
virtual mat2 | Hessian (vec2 parameters) |
Calculates and returns Hessian of the current 2D scalar function and returns it (in the form of a mat2 struct). | |
Properties | |
virtual bool | ValueDefined [get, set] |
Whether calculation of function value is defined. Defaulet is true. | |
virtual bool | GradientDefined [get, set] |
Whether calculation of functio ngradient is defined. Default is false. | |
virtual bool | HessianDefined [get, set] |
Whether calculation of function Hessian is defined. Default is false. | |
Private Attributes | |
bool | _valueDefined = true |
bool | _gradientDefined = false |
bool | _hessianDefined = false |
Base class for scalar functions of 2 variables.
This willl be base class for most of other classes that implement the IFunc2d interface. It provides a set of useful static methods.
TODO:
Consider whether this class is really needed. Maybe Func2dBase is enough. That class contains additional methods that implement the IScalarFunctionUntransformed interface, and maybe this does not justify implementation of another class just to be simpler.
$A Igor Apr09;
IG::Num::Func2dBasePlain_ToConsider::Func2dBasePlain_ToConsider | ( | ) | [inline] |
Constructor.
abstract double IG::Num::Func2dBasePlain_ToConsider::Value | ( | double | x, |
double | y | ||
) | [pure virtual] |
Calculates and returns value of the current 2D scalar function.
x | First parameter. |
y | Second parameter. |
z | Third parameter. |
Implements IG::Num::IFunc2d.
virtual double IG::Num::Func2dBasePlain_ToConsider::Value | ( | vec2 | parameters | ) | [inline, virtual] |
Calculates and returns value of the current 2D scalar function.
parameters | Vector of function parameters (in form of the Value) struct. |
Implements IG::Num::IFunc2d.
abstract void IG::Num::Func2dBasePlain_ToConsider::Gradient | ( | double | x, |
double | y, | ||
out double | gradx, | ||
out double | grady | ||
) | [pure virtual] |
Calculates gradient of the current 2D scalar function and returns its components through the specified output variables.
x | First parameter. |
y | Second parameter. |
z | Third 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.
Calculates and returns gradient of the current 2D scalar function.
<returnreturns>Gradient of the current 2D scalar function (in form of the vec2 struct)</returnreturns>
Implements IG::Num::IFunc2d.
abstract void IG::Num::Func2dBasePlain_ToConsider::Hessian | ( | double | x, |
double | y, | ||
out double | dxx, | ||
out double | dyy, | ||
out double | dxy | ||
) | [pure virtual] |
Calculates Hessian of the current 2D scalar function and returns its component through the specified output variables.
x | First parameter. |
y | Second parameter. |
z | Third 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.
Calculates and returns Hessian of the current 2D scalar function and returns it (in the form of a mat2 struct).
Implements IG::Num::IFunc2d.
bool IG::Num::Func2dBasePlain_ToConsider::_valueDefined = true [private] |
bool IG::Num::Func2dBasePlain_ToConsider::_gradientDefined = false [private] |
bool IG::Num::Func2dBasePlain_ToConsider::_hessianDefined = false [private] |
virtual bool IG::Num::Func2dBasePlain_ToConsider::ValueDefined [get, set] |
Whether calculation of function value is defined. Defaulet is true.
Implements IG::Num::IFunc2d.
virtual bool IG::Num::Func2dBasePlain_ToConsider::GradientDefined [get, set] |
Whether calculation of functio ngradient is defined. Default is false.
Implements IG::Num::IFunc2d.
virtual bool IG::Num::Func2dBasePlain_ToConsider::HessianDefined [get, set] |
Whether calculation of function Hessian is defined. Default is false.
Implements IG::Num::IFunc2d.