IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Num.Func2dBasePlain_ToConsider Class Referenceabstract

Base class for scalar functions of 2 variables. More...

+ Inheritance diagram for IG.Num.Func2dBasePlain_ToConsider:
+ Collaboration diagram for IG.Num.Func2dBasePlain_ToConsider:

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...
 
- Properties inherited from IG.Num.IFunc2d
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
 

Detailed Description

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;

Constructor & Destructor Documentation

IG.Num.Func2dBasePlain_ToConsider.Func2dBasePlain_ToConsider ( )
inline

Constructor.

Member Function Documentation

abstract double IG.Num.Func2dBasePlain_ToConsider.Value ( double  x,
double  y 
)
pure virtual

Calculates and returns value of the current 2D scalar function.

Parameters
xFirst parameter.
ySecond parameter.
zThird parameter.

Implements IG.Num.IFunc2d.

virtual double IG.Num.Func2dBasePlain_ToConsider.Value ( vec2  parameters)
inlinevirtual

Calculates and returns value of the current 2D scalar function.

Parameters
parametersVector of function parameters (in form of the Value) struct.
Returns
Function value.

Implements IG.Num.IFunc2d.

References IG.Num.vec2.x, and IG.Num.vec2.y.

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.

Parameters
xFirst parameter.
ySecond parameter.
zThird parameter.
gradxFirst component of the returned gradient.
gradySecond component of the returned gradient.
gradzThird component of the returned gradient.

Implements IG.Num.IFunc2d.

virtual vec2 IG.Num.Func2dBasePlain_ToConsider.Gradient ( vec2  parameters)
inlinevirtual

Calculates and returns gradient of the current 2D scalar function.

Parameters
parametersVector of parameters (in form of the vec2 struct)

<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.

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.

Parameters
xFirst parameter.
ySecond parameter.
zThird parameter.
dxxComponent 1-1 of the calculated Hessian.
dyyComponent 2-2 of the calculated Hessian.
dxyComponent 1-2 of the calculated Hessian.

Implements IG.Num.IFunc2d.

virtual mat2 IG.Num.Func2dBasePlain_ToConsider.Hessian ( vec2  parameters)
inlinevirtual

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.

Member Data Documentation

bool IG.Num.Func2dBasePlain_ToConsider._valueDefined = true
private
bool IG.Num.Func2dBasePlain_ToConsider._gradientDefined = false
private
bool IG.Num.Func2dBasePlain_ToConsider._hessianDefined = false
private

Property Documentation

virtual bool IG.Num.Func2dBasePlain_ToConsider.ValueDefined
getprotected set

Whether calculation of function value is defined. Defaulet is true.

virtual bool IG.Num.Func2dBasePlain_ToConsider.GradientDefined
getprotected set

Whether calculation of functio ngradient is defined. Default is false.

virtual bool IG.Num.Func2dBasePlain_ToConsider.HessianDefined
getprotected set

Whether calculation of function Hessian is defined. Default is false.


The documentation for this class was generated from the following file: