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

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

#include "mbl_mod_gram_schmidt.h"
#include <vcl_vector.h>
#include <vnl/vnl_vector.h>

Go to the source code of this file.

Functions

void mbl_mod_gram_schmidt (const vnl_matrix< double > &v, vnl_matrix< double > &e)
 Convert input basis {v} to orthonormal basis {e}.
void mbl_mod_gram_schmidt (const vnl_matrix< double > &v, vnl_matrix< double > &e, vnl_vector< double > &np)
 Convert input basis {v} to orthonormal basis {e}.

Detailed Description

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

Author:
Martin Roberts

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

    Modifications
     Mar. 2011 - Patrick Sauer - added variant that returns normalisation multipliers
   

Definition in file mbl_mod_gram_schmidt.cxx.


Function Documentation

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

Convert input basis {v} to orthonormal basis {e}.

Orthogonalise a basis using modified Gram-Schmidt.

Each basis vector is a column of v, and likewise the orthonormal bases are returned as columns of e

Definition at line 28 of file mbl_mod_gram_schmidt.cxx.

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

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 The multipliers used to normalise each vector in {e} are returned in np

Definition at line 70 of file mbl_mod_gram_schmidt.cxx.