IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Num::Func2dVectorFormBase Class Reference

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

Inheritance diagram for IG::Num::Func2dVectorFormBase:
Collaboration diagram for IG::Num::Func2dVectorFormBase:

List of all members.

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.

Detailed Description

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;


Constructor & Destructor Documentation

IG::Num::Func2dVectorFormBase::Func2dVectorFormBase ( ) [inline]

Constructor.


Member Function Documentation

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.

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

Implements IG::Num::IFunc2d.

Reimplemented in IG::Num::Func2dLinear, and IG::Num::Func2dQuadratic.

override vec2 IG::Num::Func2dVectorFormBase::Gradient ( vec2  parameters) [inline]

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.

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.

Reimplemented in IG::Num::Func2dLinear, and IG::Num::Func2dQuadratic.

override mat2 IG::Num::Func2dVectorFormBase::Hessian ( vec2  parameters) [inline]

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.

Parameters:
xFirst parameter.
ySecond parameter.
zThird 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.

Parameters:
xFirst parameter.
ySecond parameter.
gradxFirst component of the returned gradient.
gradySecond component of the returned gradient.
gradzThird 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.

Parameters:
xFirst parameter.
ySecond 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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events