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

IG::Num::Func3dQuadratic Class Reference

Quadratic function of 3 variables. Function is evaluated according to q(x) = (1/2)*x^T*G*x + b^T*x + c where x is vector of parameters, G is constant Hessian matrix, 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::Func3dQuadratic:
Collaboration diagram for IG::Num::Func3dQuadratic:

List of all members.

Public Member Functions

 Func3dQuadratic (mat3 hessian, vec3 gradient0, double scalarTerm)
 Creation of a quadratic 3D scalar function. WARNING:Matrix argument is interpreted as Hessian, i.e. twice the matrix of quadratic coefficients.
override double Value (vec3 parameters)
 Calculates and returns value of the current 3D quadratic function.
override vec3 Gradient (vec3 parameters)
 Calculates and returns gradient of the current 3D quadratic function.
override mat3 Hessian (vec3 parameters)
 Calculates and returns Hessian of the current 3D quadratic function and returns it (in the form of a mat3 struct).

Static Public Member Functions

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

Properties

mat3 HessianMatrix [get, set]
 Twice the matrix of quadratic coefficients (Hessian matrix of second derivatives).
vec3 Gradient0 [get, set]
 Vector of linear coefficients (equal to gradient of the function at x=0).
double ScalarTerm [get, set]
 Scalar additive constant.

Private Member Functions

 Func3dQuadratic ()

Private Attributes

mat3 _G
vec3 _b
double _c

Detailed Description

Quadratic function of 3 variables.

Function is evaluated according to q(x) = (1/2)*x^T*G*x + b^T*x + c where x is vector of parameters, G is constant Hessian matrix, 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::Func3dQuadratic::Func3dQuadratic ( ) [inline, private]
IG::Num::Func3dQuadratic::Func3dQuadratic ( mat3  hessian,
vec3  gradient0,
double  scalarTerm 
) [inline]

Creation of a quadratic 3D scalar function. WARNING:Matrix argument is interpreted as Hessian, i.e. twice the matrix of quadratic coefficients.

Parameters:
hessianMatrix of second derivatives (Hessian).
gradient0Vector of linear coefficients - gradient of quadratic function at x = 0.
scalarTermConstant term.

Member Function Documentation

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

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

override double IG::Num::Func3dQuadratic::Value ( vec3  parameters) [inline]

Calculates and returns value of the current 3D quadratic function.

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

Implements IG::Num::IFunc3d.

override vec3 IG::Num::Func3dQuadratic::Gradient ( vec3  parameters) [inline]

Calculates and returns gradient of the current 3D quadratic function.

Parameters:
parametersVector of parameters (in form of the vec3 struct)

<returnreturns>Gradient of the current 3D scalar function (in form of the vec3 struct)</returnreturns>

Implements IG::Num::IFunc3d.

override mat3 IG::Num::Func3dQuadratic::Hessian ( vec3  parameters) [inline]

Calculates and returns Hessian of the current 3D quadratic function and returns it (in the form of a mat3 struct).

Implements IG::Num::IFunc3d.


Member Data Documentation

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

Property Documentation

mat3 IG::Num::Func3dQuadratic::HessianMatrix [get, set]

Twice the matrix of quadratic coefficients (Hessian matrix of second derivatives).

vec3 IG::Num::Func3dQuadratic::Gradient0 [get, set]

Vector of linear coefficients (equal to gradient of the function at x=0).

double IG::Num::Func3dQuadratic::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