Functions
contrib/mul/mbl/mbl_mod_gram_schmidt.h File Reference

Orthoganalise a basis using modified Gram-Schmidt (and normalise) More...

#include <vnl/vnl_matrix.h>

Go to the source code of this file.

Functions

void mbl_mod_gram_schmidt (const vnl_matrix< double > &v, vnl_matrix< double > &e)
 Orthogonalise a basis using modified Gram-Schmidt.

Detailed Description

Orthoganalise a basis using modified Gram-Schmidt (and normalise)

Author:
Martin Roberts

Note: Modified Gram-Schmidt is more numerically stable than the classical version The partially constructed transformed jth vector is used in the successive projections rather than the untransformed

Definition in file mbl_mod_gram_schmidt.h.


Function Documentation

void mbl_mod_gram_schmidt ( const vnl_matrix< double > &  v,
vnl_matrix< double > &  e 
)

Orthogonalise a basis using modified Gram-Schmidt.

Transform basis {vk} to orthonormal basis {ek} with k in range 1..N

 for j = 1 to N
     ej = vj
     for k = 1 to j-1
         ej = ej - <ej,ek>ek   //NB Classical GS has vj in inner product
     end
     ej = ej/|ej|
  end

Convert input basis {v} to orthonormal basis {e}. Each basis vector is a column of v, and likewise the orthonormal bases are returned as columns of e

Transform basis {vk} to orthonormal basis {ek} with k in range 1..N for j = 1 to N ej = vj for k = 1 to j-1 ej = ej - <ej,ek>ek //NB Classical GS has vj in inner product end ej = ej/|ej| end Convert input basis {v} to orthonormal basis {e}. Each basis vector is a column of v, and likewise the orthonormal bases are returned as columns of e

Definition at line 24 of file mbl_mod_gram_schmidt.cxx.