Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::DLSEqnSolver Class Reference
[Math]

This class contains methods for calculating solutions to the linear system Ax=b. More...

#include <DLSEqnSolver.h>

Inheritance diagram for OSCAR::DLSEqnSolver:

Inheritance graph
[legend]
List of all members.

Public Methods

 DLSEqnSolver ()
 ~DLSEqnSolver ()
bool Redundant (const Matrix &A, Vector &x, const Vector &b)
bool RedundantWithWeights (const Matrix &A, Vector &x, const Vector &b)
void SetDamping (double damping)

Protected Attributes

double damping
Matrixidentity

Detailed Description

Author:
Chalongrath Pholsiri
This class extends RREqnSolver and uses the damped least square technique to solve the linear system Ax=b when A is singular.


Constructor & Destructor Documentation

OSCAR::DLSEqnSolver::DLSEqnSolver  
 

Constructor.

This is the default constructor for an object of type DLSEqnSolver. Use this to simply construct an instance of an DLSEqnSolver object that can be used for solving systems of linear equations.

OSCAR::DLSEqnSolver::~DLSEqnSolver  
 

Destructor.

This is the Destructor for an object of type DLSEqnSolver.


Member Function Documentation

bool OSCAR::DLSEqnSolver::Redundant const Matrix   A,
Vector   x,
const Vector   b
[virtual]
 

Solve the linear system Ax=b where A is redundant (n>m).

Solves the linear system Ax=b where A is redundant (n>m) by calculating the pseudo-inverse of the RRMatrix.

Parameters:
A A mxn matrix. A will be inverted, so it should be non-singular.
x A nx1 vector.
b A mx1 vector.
Returns:
True if the method succeeds, and False if the method fails. Call GetError() for details.
Exceptions:
matrixSizeMismatch matrixSizeMismatch.
matrixSingularity matrixSingularity.
See also:
General(const RRMatrix& A, RRVector& x, const RRVector& b)

GetSolutionProperties()

Reimplemented from OSCAR::EqnSolver.

bool OSCAR::DLSEqnSolver::RedundantWithWeights const Matrix   A,
Vector   x,
const Vector   b
[virtual]
 

Solve the linear system Ax=b where A is redundant (n>m) using a weight Matrix.

Solves the linear system Ax=b where A is redundant (n>m) using a weight Matrix. The weight matrix should be nxn, and the system is solved like so: x=W*A_Tran*inv(A*W*A_Trans). The solution instantaniously minimizes the weighted norm x_trans*inv(W)*x. The weight Matrix is defined using the SetWeights() method. If the Matrix has not been set, then a normal pseudo-inverse will be performed.

Parameters:
A A mxn Matrix. A will be inverted, so it should be non-singular.
x A nx1 vector.
b A mx1 vector.
Returns:
True if the method succeeds, and False if the method fails. Call GetError() for details.
Exceptions:
matrixSizeMismatch matrixSizeMismatch.
matrixSingularity matrixSingularity.
See also:
Redundant(const Matrix& A, Vector& x, const Vector& b)

GetSolutionProperties()

SetWeights(const Matrix& W)

Reimplemented from OSCAR::EqnSolver.

void OSCAR::DLSEqnSolver::SetDamping double    damping
 

Set the damping factor.

Parameters:
damping The damping factor. Must be non-negative. A negative number will be converted to positive. A value of zero will make this class funcationally equivalent to RREqnSolver, i.e. fails at singularities.


Member Data Documentation

double OSCAR::DLSEqnSolver::damping [protected]
 

Matrix* OSCAR::DLSEqnSolver::identity [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations