VISH  0.2
Public Types | Public Member Functions
Eagle::Quadratic Class Reference

An n x n matrix (i.e., a vector of length n*n), stored row-wise: that is, A(i,j) = A[ij], where ij = i*n + j. More...

#include </home/werner/origo/vish/ocean/eagle/QuadraticMatrix.hpp>

List of all members.

Public Types

Public Member Functions


Detailed Description

An n x n matrix (i.e., a vector of length n*n), stored row-wise: that is, A(i,j) = A[ij], where ij = i*n + j.

See also:
Matrix
Examples:

Matrix.cpp.


Member Function Documentation

bool Eagle::Quadratic::GaussDecompose ( FixedArray< int, N > &  perm,
double  EPSWEIGHT = 1E-3 
) [inline]

Perform gauss decomposition of the matrix, which can and should be used instead of computing the inverse of a matrix.

The permutation operations during the composition is stored in the perm parameter, which then needs to be provided to the GaussSolve() routine.

Author:
Marcus Weber, ZIB, based on "Formelsammlung zur Numerischen Mathematik mit C-Programmen" von G.Engeln-Maellges und F.Reutter"
Note:
The original matrix is destroyed during this operation.
Parameters:
EPSWEIGHTsquare root of the absolut precision of the computation
void Eagle::Quadratic::GaussSolve ( const PermutationVector_t perm,
const Column< N, value > &  b,
Column< N, value > &  x 
) const [inline]

Instead of inverting a matrix, solve a linear system of equations $ Ax = b $ by forward and backward elimination.

Parameters:
permA permutation vector as computed by GaussDecompose()
bThe right-hand side of the equation
xOn return, will contain the solution.
        Eagle::Quadratic<3, double> A;
        Eagle::Column<3, double> b;
        Eagle::Column<3, double> x;
        Eagle::FixedArray<int, 3> perm;

        A = 2.5,  3.0, 1.1,
            0.2,  0.1, 2.1,
            0.12, 1.0, 0.3;

        b = 39.0, 1.0, 34.33;

        A.GaussDecompose(perm);
        A.GaussSolve(perm, b, x);

The result in x then is < 16.809817, -24.730900, 16.013638 >.


The documentation for this class was generated from the following file: