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

IG::Num::Func2dLinear Class Reference

Linear (Affine) function of 2 variables. Function is evaluated according to fl(x) = b^T*x + c where x is vector of parameters, b is the vector of linear coefficients (gradient at x=0) and c is the scalar term (function value at x=0). More...

Inheritance diagram for IG::Num::Func2dLinear:
Collaboration diagram for IG::Num::Func2dLinear:

List of all members.

Public Member Functions

 Func2dLinear (vec2 gradient0, double scalarTerm)
 Creation of a linear 2D scalar function.
Parameters:
gradient0Vector of linear coefficients - gradient of the linear function.
scalarTermConstant term.

override double Value (vec2 parameters)
 Calculates and returns value of the current 2D linear function.
override vec2 Gradient (vec2 parameters)
 Calculates and returns gradient of the current 2D linear function.
override mat2 Hessian (vec2 parameters)
 Calculates and returns Hessian of the current 2D linear function (identical to zero matrix) and returns it (in the form of a mat2 struct).

Static Public Member Functions

static int GetNumConstants ()
 Returns the number of scalar constants that specify the current function.

Properties

vec2 Gradient0 [get, set]
 Vector of linear coefficients (equal to gradient of the function).
double ScalarTerm [get, set]
 Scalar additive constant.

Private Member Functions

 Func2dLinear ()

Private Attributes

vec2 _b
double _c

Detailed Description

Linear (Affine) function of 2 variables.

Function is evaluated according to fl(x) = b^T*x + c where x is vector of parameters, b is the vector of linear coefficients (gradient at x=0) and c is the scalar term (function value at x=0).

$A Igor Aug09;


Constructor & Destructor Documentation

IG::Num::Func2dLinear::Func2dLinear ( ) [inline, private]
IG::Num::Func2dLinear::Func2dLinear ( vec2  gradient0,
double  scalarTerm 
) [inline]

Creation of a linear 2D scalar function.

Parameters:
gradient0Vector of linear coefficients - gradient of the linear function.
scalarTermConstant term.


Member Function Documentation

static int IG::Num::Func2dLinear::GetNumConstants ( ) [inline, static]

Returns the number of scalar constants that specify the current function.

override double IG::Num::Func2dLinear::Value ( vec2  parameters) [inline]

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

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

Implements IG::Num::IFunc2d.

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

Calculates and returns gradient of the current 2D linear 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.

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

Calculates and returns Hessian of the current 2D linear function (identical to zero matrix) and returns it (in the form of a mat2 struct).

Implements IG::Num::IFunc2d.


Member Data Documentation

double IG::Num::Func2dLinear::_c [private]

Property Documentation

vec2 IG::Num::Func2dLinear::Gradient0 [get, set]

Vector of linear coefficients (equal to gradient of the function).

double IG::Num::Func2dLinear::ScalarTerm [get, set]

Scalar additive constant.


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