IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Base class for scalar functions of 2 variables. More...
Public Member Functions | |
Func2dBasePlain_ToConsider () | |
Constructor. More... | |
abstract double | Value (double x, double y) |
Calculates and returns value of the current 2D scalar function. More... | |
virtual double | Value (vec2 parameters) |
Calculates and returns value of the current 2D scalar function. More... | |
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. More... | |
virtual vec2 | Gradient (vec2 parameters) |
Calculates and returns gradient of the current 2D scalar function. More... | |
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. More... | |
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). More... | |
Properties | |
virtual bool | ValueDefined [get, protected set] |
Whether calculation of function value is defined. Defaulet is true. More... | |
virtual bool | GradientDefined [get, protected set] |
Whether calculation of functio ngradient is defined. Default is false. More... | |
virtual bool | HessianDefined [get, protected set] |
Whether calculation of function Hessian is defined. Default is false. More... | |
![]() | |
bool | ValueDefined [get] |
Whether calculation of function value is defined. More... | |
bool | GradientDefined [get] |
Whether calculation of function ngradient is defined. More... | |
bool | HessianDefined [get] |
Whether calculation of function Hessian is defined. More... | |
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;
|
inline |
Constructor.
|
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.
|
inlinevirtual |
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.
References IG.Num.vec2.x, and IG.Num.vec2.y.
|
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.
References IG.Num.vec2.x, and IG.Num.vec2.y.
|
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.
References IG.Num.vec2.x, and IG.Num.vec2.y.
|
private |
|
private |
|
private |
|
getprotected set |
Whether calculation of function value is defined. Defaulet is true.
|
getprotected set |
Whether calculation of functio ngradient is defined. Default is false.
|
getprotected set |
Whether calculation of function Hessian is defined. Default is false.