Documentation


linear equation solution (and matrix inversion)
[Linear algebra]


Functions

template<class M1, class M2> void animal::m_eq_ludcmp (M1 &LU, const M2 &A)
 $ LU = A $ (precond: &A!=&LU) LU decomposition of matrix A.

template<class M, class V1, class V2> void animal::v_eq_lusolve (V1 &x, const M &LU, const V2 &b)
 Solve $LUx=b$.

template<class M, class M2, class Vec> void animal::m_eq_luinv (M &Inv, const M2 &LU, Vec &aux)
 $ Inv = (LU)^{-1}$ Inverse of a matrix given its LU decomposition.

template<class M, class M2> int animal::ludcmp (M &a, M2 indx)
template<class M, class M2, class M3> int animal::lubksb (M &a, M2 indx, M3 b)
template<class M> int animal::ns1__luinv (M &a, M &b)
template<class M1, class M2> void animal::m_eq_modchol (M1 &L, const M2 &A)
 $ LL^T = A $ (precond: &A!=&L) Modified cholesky decomposition of matrix A.

template<class M, class V1, class V2> void animal::v_eq_cholsolve (V1 &x, const M &L, const V2 &b)
 Solution of a linear equation system using the modified Cholesky decomposition L of the system matrix A (see m_eq_modchol).

template<class M, class M2, class M3> void animal::m_eq_cholinv (M &Inv, const M2 &A, M3 &Tmp)
 Inverse of a symmetric positive definite matrix.

template<class M1, class M2> void animal::m_eq_invsqrt (M1 &B, const M2 &A)
 compute $ B = L^{-1} $, where $ LL^T=A $.

template<class M1, class M2> void animal::m_eq_cholfactor (M1 &L, const M2 &A)
 $ LL^T = A $ (precond: &A!=&L) Cholesky decomposition of matrix A.

template<class M1, class M2> void animal::m_eq_invsqrt2 (M1 &B, const M2 &A)
 compute $ B = L^{-1} $, where $ LL^T=A $.

template<class M1, class M2> void animal::m_eq_inv (M1 &B, const M2 &A)
 compute $ B = A^{-1} $


Function Documentation

template<class M, class M2, class M3>
int lubksb M &  a,
M2  indx,
M3  b
 

Definition at line 1314 of file linear.h.

References animal::nrows().

Referenced by animal::ns1__luinv().

template<class M, class M2>
int ludcmp M &  a,
M2  indx
 

Definition at line 1248 of file linear.h.

References animal::nrows().

Referenced by animal::ns1__luinv().

template<class M1, class M2>
void m_eq_cholfactor M1 &  L,
const M2 &  A
[inline]
 

$ LL^T = A $ (precond: &A!=&L) Cholesky decomposition of matrix A.

Only the upper triangular part of A is used. The lower triangular part of L is written. $ LL^T = A $

Precondition:
A is symmetric positive definite

&A!=&L (A and L are not the same matrix)

Definition at line 1513 of file linear.h.

References animal::ncols(), and animal::nrows().

Referenced by animal::m_eq_invsqrt2().

template<class M, class M2, class M3>
void m_eq_cholinv M &  Inv,
const M2 &  A,
M3 &  Tmp
[inline]
 

Inverse of a symmetric positive definite matrix.

(precond: &A!=&Tmp and &Inv!=&Tmp)

Parameters:
Inv the inverse of a matrix A
A the matrix to inverse
Tmp an auxiliary matrix of the same size for internal computations In-place inversion is allowed.
Precondition:
A is symmetric positive definite

&A!=&Tmp (A and Tmp are not the same matrix)

Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1465 of file linear.h.

References animal::m_eq_AtB(), and animal::m_eq_invsqrt().

template<class M1, class M2>
void m_eq_inv M1 &  B,
const M2 &  A
[inline]
 

compute $ B = A^{-1} $

Precondition:
A is 3*3 matrix (not singular)

&B!=&A (A and B are not the same matrix)

Definition at line 1595 of file linear.h.

References animal::ncols(), and animal::nrows().

template<class M1, class M2>
void m_eq_invsqrt M1 &  B,
const M2 &  A
[inline]
 

compute $ B = L^{-1} $, where $ LL^T=A $.

Precondition:
A is symmetric positive definite

&B!=&A (A and B are not the same matrix)

Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1479 of file linear.h.

References animal::m_eq_modchol(), animal::ncols(), and animal::nrows().

Referenced by animal::m_eq_cholinv().

template<class M1, class M2>
void m_eq_invsqrt2 M1 &  B,
const M2 &  A
[inline]
 

compute $ B = L^{-1} $, where $ LL^T=A $.

Precondition:
A is symmetric positive definite

&B!=&A (A and B are not the same matrix)

Definition at line 1559 of file linear.h.

References animal::m_eq_cholfactor(), animal::ncols(), and animal::nrows().

template<class M1, class M2>
void m_eq_ludcmp M1 &  LU,
const M2 &  A
 

$ LU = A $ (precond: &A!=&LU) LU decomposition of matrix A.

Matrix L is stored in the lower triangle of LU, including the diagonal. Matrix U is stored in the strictly upper triangular part of LU. Since the diagonal entries of U are all equal to 1, they are not stored.

Precondition:
&A!=&LU (matrix A and LU are not the same)
Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1140 of file linear.h.

References animal::ncols(), and animal::nrows().

Referenced by animal::octree::getMatrixInverse().

template<class M, class M2, class Vec>
void m_eq_luinv M &  Inv,
const M2 &  LU,
Vec &  aux
 

$ Inv = (LU)^{-1}$ Inverse of a matrix given its LU decomposition.

(precond: &Inv!=&LU)

Parameters:
Inv the inverse of a matrix A
LU the LU decomposition of matrix A (see m_eq_ludcmp)
aux an auxiliary vector of the same size as the matrix.
Precondition:
&Inv!=&LU (Inv and LU are not the same matrix)
Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1213 of file linear.h.

References animal::ncols(), animal::nrows(), animal::size(), and animal::v_assign().

Referenced by animal::b_eq_inverse(), and animal::octree::getMatrixInverse().

template<class M1, class M2>
void m_eq_modchol M1 &  L,
const M2 &  A
[inline]
 

$ LL^T = A $ (precond: &A!=&L) Modified cholesky decomposition of matrix A.

Only the upper triangular part of A is used. The lower triangular part of L is written. The values of the diagonal of L are inversed (1/) with respect to the real cholesky decomposition. This accelerates the solution of an equation system based on this decomposition. Consequently, $ LL^T \neq A $

Precondition:
A is symmetric positive definite

&A!=&L (A and L are not the same matrix)

Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1395 of file linear.h.

References animal::ncols(), and animal::nrows().

Referenced by animal::m_eq_invsqrt().

template<class M>
int ns1__luinv M &  a,
M &  b
 

Definition at line 1352 of file linear.h.

References animal::lubksb(), animal::ludcmp(), and animal::nrows().

template<class M, class V1, class V2>
void v_eq_cholsolve V1 &  x,
const M &  L,
const V2 &  b
[inline]
 

Solution of a linear equation system using the modified Cholesky decomposition L of the system matrix A (see m_eq_modchol).

Given L and vector b, the method computes x such that $ Ax=b $ . (precond: &x!=&b)

Precondition:
&x!=&b (x and b are not the same vector)
Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1430 of file linear.h.

References animal::ncols(), animal::nrows(), and animal::size().

template<class M, class V1, class V2>
void v_eq_lusolve V1 &  x,
const M &  LU,
const V2 &  b
[inline]
 

Solve $LUx=b$.

Solution of a linear equation system using the LU decomposition of a matrix A. Given matrix LU and vector b, the method computes vector x such that $ Ax=b $ . (precond: &x!=&b) Matrix LU stores L in its lower triangular part (including the diagonal) and U in its stricly upper triangular part. Since the diagonal entries of U are all equal to 1, they are not stored explicitely.

Precondition:
&x!=&b (x and b are not the smae vector)
Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 1180 of file linear.h.

References animal::ncols(), animal::nrows(), and animal::size().


Generated on Thu Dec 23 13:52:29 2004 by doxygen 1.3.6