lsp Namespace Reference

Basic namespace. More...


Classes

class  bidiagonal_transform
 A functor for the transformation matrix into the bidiagonal form using Householder transformations. More...
class  givens_rotation
 A functor for the Givens rotation transformation. More...
class  householder_transform
 A functor for the Householder transformation. More...
class  least_squares
 A functor for solving the Least Squares Problem. More...
class  nnls
 A functor for solving Non-Negative Least Squares problem. More...
class  qr_decomposition
 A functor for the modified QR decomposition. More...
class  singular_decomposition
 A functor for the singular value decomposition (SVD). More...
class  less_abs
 Comparsion of absoulte values. More...
class  vector_less
 Comparsion functor for permutation vector. More...
class  vector_less_nnls1
 Special comparsion functor for NNLS. More...
class  null_type
 Special null type with some predifined operations. More...

Functions

template<class M >
void cholesky_decomposition (M &m, const upper_tag &)
 Upper Cholesky decomposition.
template<class M >
void cholesky_decomposition (M &m, const unit_upper_tag &)
 Unit upper Cholesky decomposition.
template<class M >
void cholesky_decomposition (M &m, const lower_tag &)
 Lower Cholesky decomposition.
template<class M >
void cholesky_decomposition (M &m)
template<class M >
void cholesky_decomposition (M &m, const unit_lower_tag &)
 Unit lower Cholesky decomposition.
template<class V , class IS , class Cond >
bool is_vector_elem (const V &vec, const IS &index_space)
 A function for cheking condition on the vector elements.
template<class IS , class IT >
void swap_indexes (IS &src, IS &dest, const IT &index)
 A function for swap an index between two index spaces.


Detailed Description

Basic namespace.


Function Documentation

template<class M >
void lsp::cholesky_decomposition ( M &  m,
const unit_lower_tag &   
) [inline]

Unit lower Cholesky decomposition.

Parameters:
[in,out] m The matrix to be decomposited. Result is stored in this object.
See also:
cholesky_decomposition( M& m, const unit_upper_tag& )

References cholesky_decomposition().

template<class M >
void lsp::cholesky_decomposition ( M &  m,
const lower_tag &   
) [inline]

Lower Cholesky decomposition.

Parameters:
[in,out] m The matrix to be decomposited. Result is stored in this object.
See also:
cholesky_decomposition( M& m, const upper_tag& )

References cholesky_decomposition().

template<class M >
void lsp::cholesky_decomposition ( M &  m,
const unit_upper_tag &   
) [inline]

Unit upper Cholesky decomposition.

Parameters:
[in,out] m The matrix to be decomposited. Result is stored in this object.
See also:
cholesky_decomposition( M& m, const upper_tag& )
The decomposition defined as $ C = R^T D R $ where $ R $ is unit upper triangular, $ D $ is diagonal

A short example is given for explanation of usage:

  matrix< value_type > src;
  
  cholesky_decomposition( src, unit_upper_tag() ); // src is broken now

  triangular_adaptor< matrix< value_type >, upper > r( src ); // representation of the upper triangular matrix
  banded_adaptor< matrix< value_type > > diag( src ); // representation of the diagonal matrix

  matrix< value_type > inv = identity_matrix< value_type >( r.size1() );
  inplace_solve(r, inv, unit_upper_tag()); // inv is inverse for R matrix now

template<class M >
void lsp::cholesky_decomposition ( M &  m,
const upper_tag &   
) [inline]

Upper Cholesky decomposition.

Parameters:
[in,out] m The matrix to be decomposited. Result is stored in this object.
Cholesky decomposition is defined only for symmetric positive semidefined matrixes. This conditions aren't checked.

The decomposition defined as $ C = R^T R $ where $ R $ is upper triangular.

A short example is given for explanation of usage:

  matrix< value_type > src;
  
  cholesky_decomposition( src, upper_tag() ); // src is broken now

  triangular_adaptor< matrix< value_type >, upper > r( src ); // representation of the upper triangular matrix

  matrix< value_type > inv = identity_matrix< value_type >( r.size1() );
  inplace_solve(r, inv, upper_tag()); // inv is inverse for R matrix now

Referenced by cholesky_decomposition().

template<class V , class IS , class Cond >
bool lsp::is_vector_elem ( const V &  vec,
const IS &  index_space 
) [inline]

A function for cheking condition on the vector elements.

Parameters:
[in] vec The given vector
[in] index_space The index space $ I $
Returns:
true if $ \forall i \in I : $, false otherwise

Referenced by lsp::nnls< M, V >::solve().

template<class IS , class IT >
void lsp::swap_indexes ( IS &  src,
IS &  dest,
const IT &  index 
) [inline]

A function for swap an index between two index spaces.

Parameters:
src Source index space
dest Destination index space
index index
If index is presented in source space it removes the index from source space and pushs back to destination space,

Referenced by lsp::nnls< M, V >::solve().


doxygen