NSMath::TSolvers Class Reference

TSolver class. More...

#include <Solvers.h>

Inheritance diagram for NSMath::TSolvers:

Inheritance graph
[legend]
Collaboration diagram for NSMath::TSolvers:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

static BOOL RootsCubicReal (const float &b, const float &c, const float &d, float &root1, float &root2, float &root3)
 This method finds real roots for given cubic polynomial.
static BOOL RootsQuadraticReal (const float &a, const float &b, const float &c, float &root1, float &root2)
 This method finds real roots for given quadratic polynomial.
static void Matrix3CM_RowEcholonForm_Householder (TMatrix3 &mat)
 This method converts specified matrix to matrix that has below diagonal only zeros (row echolon form).
static void Matrix3RM_RowEcholonForm_Householder (TMatrix3 &mat)
 This method converts specified matrix to matrix that has below diagonal only zeros (row echolon form).

Detailed Description

TSolver class.

This is pure static class that contains method solving mathematical problems like roots finding etc.

Definition at line 45 of file Solvers.h.


Member Function Documentation

void TSolvers::Matrix3CM_RowEcholonForm_Householder TMatrix3 mat  )  [static]
 

This method converts specified matrix to matrix that has below diagonal only zeros (row echolon form).

Note:
Method uses Householder reduction.
Parameters:
mat [in out] matrix to convert - must be in COLUMN-MAJOR order

Definition at line 155 of file Solvers.cpp.

References NSMath::TVector3::Dot(), NSMath::TMatrix3::GetRow(), NSMath::NSStdMath::invSqrt(), NSMath::TVector3::Length(), NSMath::NSStdMath::sqrt(), NSMath::TVector3::Sub(), NSMath::TVector3::x, and NSMath::TVector3::y.

Referenced by Matrix3RM_RowEcholonForm_Householder().

Here is the call graph for this function:

void TSolvers::Matrix3RM_RowEcholonForm_Householder TMatrix3 mat  )  [static]
 

This method converts specified matrix to matrix that has below diagonal only zeros (row echolon form).

Note:
Method uses Householder reduction.
Parameters:
mat [in out] matrix to convert - must be in ROW-MAJOR order

Definition at line 214 of file Solvers.cpp.

References Matrix3CM_RowEcholonForm_Householder(), and NSMath::TMatrix3::Transpose().

Here is the call graph for this function:

BOOL TSolvers::RootsCubicReal const float &  b,
const float &  c,
const float &  d,
float &  root1,
float &  root2,
float &  root3
[static]
 

This method finds real roots for given cubic polynomial.

A * X^3 + B * X^2 + C * X + D = 0.

Method suppose coefficient A == 1. If you have A != 1 then simply divide all components of polynomial with this A coefficient.

Method compute result only if all three roots are real, otherwise returns FALSE.

Parameters:
b [in] coefficient B from polynom
c [in] coefficient C from polynom
d [in] coefficient D from polynom
root1 [out] first root - if method returns FALSE it wont be changed
root2 [out] second root - if method returns FALSE it wont be changed
root3 [out] third root - if method returns FALSE it wont be changed

Definition at line 33 of file Solvers.cpp.

References NSMath::NSStdMath::acos(), NSMath::NSStdMath::cos(), NSMath::NSStdMath::fabs(), FALSE, NSMath::NSStdMath::invSqrt(), NSMath::NSStdMath::PI, NSMath::NSStdMath::pow(), NSMath::NSStdMath::sqrt(), and TRUE.

Referenced by NSMath::TMatrix3::EigenValuesSymmetrical().

Here is the call graph for this function:

BOOL TSolvers::RootsQuadraticReal const float &  a,
const float &  b,
const float &  c,
float &  root1,
float &  root2
[static]
 

This method finds real roots for given quadratic polynomial.

A * X^2 + B * X + C = 0

Method compute result only if all three roots are real, otherwise returns FALSE.

Parameters:
a [in] coefficient A
b [in] coefficient B
c [in] coefficient C
root1 [out] first root - if method returns FALSE it won't be changed
root2 [out] second root - if method returns FALSE it won't be changed

Definition at line 119 of file Solvers.cpp.

References NSMath::NSStdMath::div(), FALSE, NSMath::NSStdMath::sqrt(), and TRUE.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 22:58:19 2007 for Joy4D by  doxygen 1.4.6-NO