Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::SVD3x3 Class Reference

singular value decomposition for 3x3 matrices More...

#include <MathAlgo/SVD3x3.hh>

+ Inheritance diagram for BIAS::SVD3x3:
+ Collaboration diagram for BIAS::SVD3x3:

Public Member Functions

const int AbsLeftNullspaceDim () const
 returns the dim of the matrix's left nullspace, using absolute threshold criterion More...
 
const int AbsNullspaceDim () const
 returns dim of nullspace using the absolute threshold criterion More...
 
const int AbsRightNullspaceDim () const
 returns the dim of the matrix's right nullspace, using absolute threshold criterion More...
 
void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
int Compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
 set a new matrix and compute its decomposition. More...
 
int compute (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
 use our naming convention More...
 
int ComputeOpenCV (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
 Use OpenCV for decomposition as Lapack frequently leads to crashes under windows. More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int General_Eigenproblem_GeneralMatrix_Lapack (const Matrix< double > &M)
 solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd . More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
BIAS::Vector< double > GetEigenValues ()
 Call this after Compute(), returns the eigenvalues of the matrix in ascending order (smallest first), which are NOT the singular values! Works only, if the original Matrix was symmetric. More...
 
bool GetLeftNullvector (Vector< double > &nv, const int last_offset=0)
 Return one of the left nullvectors. More...
 
Vector< double > GetLeftNullvector (const int last_offset=0)
 same as above but returning vector More...
 
Vector< double > GetNullvector (const int last_offset=0)
 return one of the nullvectors. More...
 
bool GetNullvector (Vector< double > &NullVec, const int last_offset=0)
 Returns one of the nullvectors in argument and true if Nullvector exists. More...
 
const Vector< double > & GetS () const
 return S which is a vector of the singular values of A in descending order. More...
 
const double GetSingularValue (int index) const
 return one singular value (which may be zero). More...
 
const Matrix< double > & GetU () const
 return U U is a m x m orthogonal matrix More...
 
Matrix< double > GetV () const
 return V More...
 
const Matrix< double > & GetVT () const
 return VT (=transposed(V)) More...
 
double GetZeroThreshold () const
 return zerothresh currently used More...
 
Matrix< double > Invert ()
 returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T More...
 
Matrix< double > Invert (int rank)
 returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T the first "rank" elements of S are inverted the others are set to zero More...
 
Matrix< double > Invert (Matrix< double > A)
 as above, but compute new svd for a More...
 
Matrix< double > InvertOpenCV (const Matrix< double > &A)
 Calculates new inverse with OpenCV cvInvert. More...
 
const int LeftNullspaceDim () const
 returns the dim of the matrix's left nullspace More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
const int NullspaceDim () const
 return the dim of the nullspace. More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
unsigned int Rank ()
 returns the rank of A_ More...
 
const int RelLeftNullspaceDim () const
 
const int RelNullspaceDim () const
 compare singular values against greatest, not absolute More...
 
const int RelRightNullspaceDim () const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
const int RightNullspaceDim () const
 returns the dim of the matrix's right nullspace More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
int size () const
 return the length of the singular value vector inline const int size() const More...
 
Vector< double > Solve (const Vector< double > &y) const
 
Vector< double > solve (const Vector< double > &y) const
 use our naming convention More...
 
int Solve (Matrix< double > &A, Vector< double > &B, Vector< double > &X)
 solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$. More...
 
Matrix< double > Sqrt ()
 returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M. More...
 
Matrix< double > Sqrt (const Matrix< double > &A)
 as above, but compute new svd for More...
 
Matrix< double > SqrtT ()
 returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M. More...
 
Matrix< double > SqrtT (const Matrix< double > &A)
 as above, but compute new svd for More...
 
 SVD3x3 ()
 
 SVD3x3 (const Matrix< double > &M, double ZeroThreshold=DEFAULT_DOUBLE_ZERO_THRESHOLD)
 constructor solve the general eigenproblem of the rectangular matrix M More...
 
virtual ~SVD3x3 ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

void _Swap (int a, int b)
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
Matrix< double > A_
 data members: original matrix (to be decomposed) More...
 
bool AbsoluteZeroThreshold_
 determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative) More...
 
bool Decomposed_
 flag for holding decomposed matrix More...
 
Vector< double > S_
 contains the singular values of A_ corresponding to the i'th column in descending order. More...
 
Matrix< double > U_
 contains columnwise the left singular vectors of A_ corresponding to the i'th singular value More...
 
Matrix< double > VT_
 contains the right singular vectors of A- in rows [because VT is transpose(V) ] More...
 
double ZeroThreshold_
 values below this threshold are treated as zero More...
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

singular value decomposition for 3x3 matrices

koeser: There is an example matrix F[0][0] =0.00075284066373225704; F[0][1] =-0.099906426438442303; F[0][2] =0.16267766990357244; F[1][0] =0.10333163045064053; F[1][1] =0.0014727467665194025; F[1][2] =0.6803859609102173; F[2][0] =-0.16234020366691171; F[2][1] =-0.68087420277635458; F[2][2] =0.0021896762792443826; where the svd fails (at least) on p4 systems with gcc 3.3.1 and 3.3.3 with -O3 (independent of march-flag), but where it does not fail with O2. SVD3x3 is implemented as an algorithm, which computes each singular value and corresponding vector by iterating until some error measure e becomes small compared to a reference value ref: if (ref+e==ref) then converged=true; With O3 this condition never becomes true for the second singular value, because the difference of lhs and rhs stays at 1e-18, while in O2 this converges after two iterations to zero. We have problems here in the order of machine precision, the question is now whether this different behaviour of O2 and O3 is due to a compiler error or an algorithmic weakness. When tracing back the two execution branches of ExampleSVD3x3 (O2 and O3), which uses the above matrix one finds that in the very beginning, s and a[k][i] are absolutely the same before the line: s += a[k][i]*a[k][i]; and after this line s differs by the last digit. Such effects sum up and result in the failing of the convergence of the SVD. Debugging in O3 is complicated because every cout causes a side-effect and changes execution order and results, so I found that even adding one simple cout at some line made the algorithm converge for that example.

In my opinion this means that the svd algorihtm makes some convergence assumptions about values in the order of machine precision which are not always fulfilled, therefore it does not converge. This is just one example which happens with O3 but there may also be one for O2, which we have not found ? It may however also be an optimization "error" of gcc.

Author
woelk 08/2004
Examples:
ExampleSVD.cpp, and ExampleSVD3x3.cpp.

Definition at line 74 of file SVD3x3.hh.

Constructor & Destructor Documentation

SVD3x3::SVD3x3 ( )

Definition at line 40 of file SVD3x3.cpp.

SVD3x3::SVD3x3 ( const Matrix< double > &  M,
double  ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD 
)

constructor solve the general eigenproblem of the rectangular matrix M

Author
woelk 07/2004
Bug:
does not always converge when general svd does

Definition at line 50 of file SVD3x3.cpp.

virtual BIAS::SVD3x3::~SVD3x3 ( )
inlinevirtual

Definition at line 86 of file SVD3x3.hh.

Member Function Documentation

void BIAS::SVD3x3::_Swap ( int  a,
int  b 
)
inlineprotected

Definition at line 97 of file SVD3x3.hh.

const int SVD::AbsLeftNullspaceDim ( ) const
inherited

returns the dim of the matrix's left nullspace, using absolute threshold criterion

Author
woelk 04 2003

Definition at line 467 of file SVD.cpp.

const int SVD::AbsNullspaceDim ( ) const
inherited

returns dim of nullspace using the absolute threshold criterion

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace

Author
Jan Woetzel 04/04/2002

Definition at line 415 of file SVD.cpp.

const int SVD::AbsRightNullspaceDim ( ) const
inherited

returns the dim of the matrix's right nullspace, using absolute threshold criterion

Author
woelk 04 2003

Definition at line 459 of file SVD.cpp.

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

int SVD3x3::Compute ( const Matrix< double > &  M,
double  ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD 
)

set a new matrix and compute its decomposition.

this function is based on svdcmp from the numerical recipes in C

solves the general eigenproblem of the rectangular matrix M

Bug:
does not always converge when general svd does
Author
woelk 07/2004
Examples:
ExampleSVD.cpp.

Definition at line 68 of file SVD3x3.cpp.

References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

int BIAS::SVD::compute ( const Matrix< double > &  M,
double  ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD 
)
inlineinherited

use our naming convention

Definition at line 132 of file SVD.hh.

Referenced by BIAS::PMatrix::MakeSVD_().

int SVD::ComputeOpenCV ( const Matrix< double > &  M,
double  ZeroThreshold = DEFAULT_DOUBLE_ZERO_THRESHOLD 
)
inherited

Use OpenCV for decomposition as Lapack frequently leads to crashes under windows.

Attention
This does not deliver the same results as Compute(). The columns of U and VT differ in sign.
Author
Ingo Schiller
Examples:
ExampleSVD.cpp.

Definition at line 51 of file SVD.cpp.

References BIAS::Matrix< T >::GetCols(), and BIAS::Matrix< T >::GetRows().

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int SVD::General_Eigenproblem_GeneralMatrix_Lapack ( const Matrix< double > &  M)
inherited

solve the general (non-special) eigenvalue/eigenvector problem of a general (non-symmetric) matrix M calls the extern liblapack routine dgesvd .

computes the genral singular value decomposition with M = U * Sigma(S) * VT with Sigma(S) is the qudratic, symmetric matrix which contains the singular vales in the diagonal and zero and zero else. U, VT as described in the data mambers.

Author
Jan Woetzel (04/04/2002)

Definition at line 110 of file SVD.cpp.

References General_singular_value_decomposition().

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

BIAS::Vector< double > SVD::GetEigenValues ( )
inherited

Call this after Compute(), returns the eigenvalues of the matrix in ascending order (smallest first), which are NOT the singular values! Works only, if the original Matrix was symmetric.

Author
grest, July 2006

Definition at line 573 of file SVD.cpp.

Referenced by BIAS::CamPoseCalib::SolveLM_().

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

bool BIAS::SVD::GetLeftNullvector ( Vector< double > &  nv,
const int  last_offset = 0 
)
inlineinherited

Return one of the left nullvectors.

If last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1] otherwise 0 is returned

Author
JMF/koeser

Definition at line 443 of file SVD.hh.

References TNT::Vector< T >::newsize(), BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_rows(), BIAS::SVD::S_, BIAS::SVD::U_, and BIAS::SVD::VT_.

Referenced by BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::TrifocalTensor::GetEpipolarLines(), BIAS::FMatrix::GetEpipoles(), and BIAS::SVD::GetLeftNullvector().

Vector< double > BIAS::SVD::GetLeftNullvector ( const int  last_offset = 0)
inlineinherited

same as above but returning vector

Definition at line 434 of file SVD.hh.

References BIAS::SVD::GetLeftNullvector(), TNT::Matrix< T >::num_rows(), and BIAS::SVD::VT_.

Vector< double > BIAS::SVD::GetNullvector ( const int  last_offset = 0)
inlineinherited

return one of the nullvectors.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author
Jan Woetzel(08/08/2002), JMF

Definition at line 404 of file SVD.hh.

References TNT::Matrix< T >::num_cols(), and BIAS::SVD::VT_.

Referenced by BIAS::TFTensorEstimation::Compute(), BIAS::TrifocalTensor::ComputeEpipoles(), BIAS::ProjectionParametersProjective::GetC(), BIAS::TrifocalTensor::GetEpipolarLines(), BIAS::FMatrix::GetEpipoles(), BIAS::PMatrix::GetNullVector(), BIAS::Conic2D::GetPoint(), BIAS::PlaneRANSAC::RefineSolution(), and BIAS::FMatrixEstimation::SevenPoint().

bool BIAS::SVD::GetNullvector ( Vector< double > &  NullVec,
const int  last_offset = 0 
)
inlineinherited

Returns one of the nullvectors in argument and true if Nullvector exists.

if last_offset=0 then the last nullvector (corresponding to the smallest singular value) is returned, if last_offset=1 then the last but one nullvector is returned, and so on. The last_offset must be in [0..NullspaceDim-1].

Author
Jan Woetzel (08/08/2002), JMF

Definition at line 413 of file SVD.hh.

References TNT::Vector< T >::newsize(), BIAS::SVD::NullspaceDim(), TNT::Matrix< T >::num_cols(), and BIAS::SVD::VT_.

const Vector<double>& BIAS::SVD::GetS ( ) const
inlineinherited
const double BIAS::SVD::GetSingularValue ( int  index) const
inlineinherited

return one singular value (which may be zero).

inline implementations

the index runs from 0.. (size-1)

Author
Jan Woetzel 04/04/2002

Definition at line 386 of file SVD.hh.

References BIAS::SVD::S_, BIAS::SVD::size(), and TNT::Vector< T >::size().

Referenced by BIAS::CamPoseCalib::outputPose_().

const Matrix<double>& BIAS::SVD::GetU ( ) const
inlineinherited
Matrix< double > BIAS::SVD::GetV ( ) const
inlineinherited
const Matrix<double>& BIAS::SVD::GetVT ( ) const
inlineinherited
double BIAS::SVD::GetZeroThreshold ( ) const
inlineinherited

return zerothresh currently used

Author
koeser

Definition at line 160 of file SVD.hh.

Referenced by BIAS::PMatrixLinear::Compute().

Matrix< double > SVD::Invert ( )
inherited
Matrix< double > SVD::Invert ( int  rank)
inherited

returns pseudoinverse of A = U * S * V^T A^+ = V * S^+ * U^T the first "rank" elements of S are inverted the others are set to zero

Author
Christian Beder

Definition at line 243 of file SVD.cpp.

References BIAS::Matrix< T >::SetZero().

Matrix< double > SVD::Invert ( Matrix< double >  A)
inherited

as above, but compute new svd for a

Definition at line 268 of file SVD.cpp.

Matrix< double > SVD::InvertOpenCV ( const Matrix< double > &  A)
inherited

Calculates new inverse with OpenCV cvInvert.

Attention
This does not deliver the same results as Invert().
Examples:
ExampleSVD.cpp.

Definition at line 182 of file SVD.cpp.

References BIAS::Matrix< T >::GetCols(), and BIAS::Matrix< T >::GetRows().

const int BIAS::SVD::LeftNullspaceDim ( ) const
inlineinherited

returns the dim of the matrix's left nullspace

Author
woelk 04 2003

Definition at line 223 of file SVD.hh.

Referenced by BIAS::TFTensorEstimation::Compute().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
const int BIAS::SVD::NullspaceDim ( ) const
inlineinherited

return the dim of the nullspace.

For rectangular matrices this is the number of singular values which are (about) zero. The nullspace is spaned by the singular vectors corresponding to the zero singular values. woelk 4 2003: changed API, diffentiate between Left and Right Nullspace koeser 01/2005: rel/abs handled by flag: AbsoluteZeroThreshold_ determines whther we compare absolute or relative singular values against the threshold

Author
Jan Woetzel 04/04/2002
Examples:
ExampleSVD3x3.cpp.

Definition at line 209 of file SVD.hh.

Referenced by BIAS::FMatrix::GetEpipoles(), BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetNullvector(), and BIAS::FMatrix::IsValid().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

unsigned int SVD::Rank ( )
inherited

returns the rank of A_

Definition at line 506 of file SVD.cpp.

Referenced by BIAS::LDA::ComputeReductionMatrix(), Lapack_LLS_QR_linear_solve(), and BIAS::PlaneRANSAC::RefineSolution().

const int SVD::RelLeftNullspaceDim ( ) const
inherited

Definition at line 485 of file SVD.cpp.

const int SVD::RelNullspaceDim ( ) const
inherited

compare singular values against greatest, not absolute

Author
Christian Buck changed criterion for insignificant singular values according to hartley/zisserman from s_i<ZeroThreshold to s_i/s_0<ZeroThreshold. fallback to old criterion iff s_0=0.

Definition at line 433 of file SVD.cpp.

Referenced by BIAS::PMatrixLinear::Compute(), BIAS::PMatrixLinear::ComputeCalibrated(), and BIAS::Conic2D::GetDualConic().

const int SVD::RelRightNullspaceDim ( ) const
inherited

Definition at line 463 of file SVD.cpp.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

const int BIAS::SVD::RightNullspaceDim ( ) const
inlineinherited

returns the dim of the matrix's right nullspace

Author
woelk 04 2003

Definition at line 216 of file SVD.hh.

Referenced by BIAS::TFTensorEstimation::Compute().

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

int BIAS::SVD::size ( ) const
inlineinherited

return the length of the singular value vector inline const int size() const

Definition at line 192 of file SVD.hh.

Referenced by BIAS::SVD::GetSingularValue().

Vector< double > SVD::Solve ( const Vector< double > &  y) const
inherited
Vector<double> BIAS::SVD::solve ( const Vector< double > &  y) const
inlineinherited

use our naming convention

Definition at line 292 of file SVD.hh.

int SVD::Solve ( Matrix< double > &  A,
Vector< double > &  B,
Vector< double > &  X 
)
inherited

solves the overdetermined linear system $AX=B$ with the unknown $X$, where $A$ is an $m x n$ matrix ($m>n$)and B is a vector of size $m$.

Author
woelk 07/2004

Definition at line 516 of file SVD.cpp.

References BIAS::Matrix< T >::GetSystemMatrix(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and BIAS::Matrix< T >::Transpose().

Matrix< double > SVD::Sqrt ( )
inherited

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S) * V_T, such that A*A = M.

The result is only valid when the M is symmetric positive definite.

Author
woelk 01/2006
Examples:
ExampleSVD.cpp.

Definition at line 276 of file SVD.cpp.

References BIAS::Equal(), BIAS::GreaterEqual(), BIAS::MatrixZero, BIAS::Matrix< T >::SetZero(), TNT::Vector< T >::size(), and Upper_symmetric_eigenvalue_solve().

Matrix< double > SVD::Sqrt ( const Matrix< double > &  A)
inherited

as above, but compute new svd for

Parameters
A

Definition at line 337 of file SVD.cpp.

Matrix< double > SVD::SqrtT ( )
inherited

returns the square root of a symmetric positive definite matrix M A = sqrt(M) = U * sqrt(S), such that A*A^T = M.

The result is only valid when the M is symmetric positive definite.

Author
woelk 01/2006

Definition at line 344 of file SVD.cpp.

References BIAS::Equal(), BIAS::GreaterEqual(), BIAS::MatrixZero, TNT::Vector< T >::size(), and Upper_symmetric_eigenvalue_solve().

Referenced by BIAS::LDA::ComputeReductionMatrix(), and BIAS::UnscentedTransform::ComputeSigmaPoints_().

Matrix< double > SVD::SqrtT ( const Matrix< double > &  A)
inherited

as above, but compute new svd for

Parameters
A

Definition at line 407 of file SVD.cpp.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

Matrix<double> BIAS::SVD::A_
protectedinherited

data members: original matrix (to be decomposed)

Definition at line 355 of file SVD.hh.

bool BIAS::SVD::AbsoluteZeroThreshold_
protectedinherited

determines whether we compare singular-values directly (absolute) to the zero threshold or whether we compare the ratio of the sing-value under inspection and the largest one to the threshold (relative)

Definition at line 372 of file SVD.hh.

bool BIAS::SVD::Decomposed_
protectedinherited

flag for holding decomposed matrix

Definition at line 378 of file SVD.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

Vector<double> BIAS::SVD::S_
protectedinherited

contains the singular values of A_ corresponding to the i'th column in descending order.

Definition at line 359 of file SVD.hh.

Referenced by BIAS::SVD::GetLeftNullvector(), and BIAS::SVD::GetSingularValue().

Matrix<double> BIAS::SVD::U_
protectedinherited

contains columnwise the left singular vectors of A_ corresponding to the i'th singular value

Definition at line 363 of file SVD.hh.

Referenced by BIAS::SVD::GetLeftNullvector().

Matrix<double> BIAS::SVD::VT_
protectedinherited

contains the right singular vectors of A- in rows [because VT is transpose(V) ]

Definition at line 367 of file SVD.hh.

Referenced by BIAS::SVD::GetLeftNullvector(), BIAS::SVD::GetNullvector(), and BIAS::SVD::GetV().

double BIAS::SVD::ZeroThreshold_
protectedinherited

values below this threshold are treated as zero

Definition at line 375 of file SVD.hh.


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