library of assembled shared sources

http://lass.cocamware.com

lass::num::impl Namespace Reference


Data Structures

struct  IntPow
struct  IntDiv
struct  IntMod
struct  RangePolicy< rtClosed >
struct  RangePolicy< rtLeftOpen >
struct  RangePolicy< rtRightOpen >
struct  RangePolicy< rtOpen >
struct  Revertor
struct  Revertor< 0 >
struct  Revertor< 1 >
struct  Revertor< 2 >
struct  Revertor< 4 >
struct  EndianCaster
struct  EndianCaster< numOfBytes, endian, endian >
class  MStorage
class  MScalar
struct  MatrixExpressionTraits
struct  MatrixExpressionTraits< MScalar< T > >
class  MProd
class  MTrans
class  MFun
class  MVColumn
class  MVDiag
class  MVRightProd
class  VStorage
class  VScalar
struct  VectorExpressionTraits
struct  VectorExpressionTraits< VScalar< T > >
class  VFun
struct  Dummy

Functions

 LASS_META_ASSERT (lass::bitsPerByte==8, one_byte_is_not_8_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tint8)*lass::bitsPerByte==8, Tint8_must_be_8_bits_)
 LASS_META_ASSERT (sizeof(lass::num::Tuint8)*lass::bitsPerByte==8, Tuint8_must_be_8_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tint16)*lass::bitsPerByte==16, Tint16_must_be_16_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tuint16)*lass::bitsPerByte==16, Tuint16_must_be_16_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tint32)*lass::bitsPerByte==32, Tint32_must_be_32_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tuint32)*lass::bitsPerByte==32, Tuint32_must_be_32_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tint64)*lass::bitsPerByte==64, Tint64_must_be_64_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tuint64)*lass::bitsPerByte==64, Tuint64_must_be_64_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tfloat32)*lass::bitsPerByte==32, Tfloat32_must_be_32_bits)
 LASS_META_ASSERT (sizeof(lass::num::Tfloat64)*lass::bitsPerByte==64, Tfloat64_must_be_64_bits)
 LASS_META_ASSERT (sizeof(lass::num::TintPtr)==sizeof(void *), TintPtr_must_be_size_of_pointer)
 LASS_META_ASSERT (sizeof(lass::num::TuintPtr)==sizeof(void *), TuintPtr_must_be_size_of_pointer)
template<typename T , typename ForwardIterator >
num::Polynomial< T > laplaceToZHelper (ForwardIterator first, ForwardIterator last, const T &samplingFrequency)
template<typename T , typename ForwardIterator1 , typename ForwardIterator2 >
std::pair< std::vector< T >
, std::vector< T > > 
laplaceToZ (ForwardIterator1 numeratorFirst, ForwardIterator1 numeratorLast, ForwardIterator2 denominatorFirst, ForwardIterator2 denominatorLast, const T &samplingFrequency)
template<typename T >
std::pair< std::vector< T >
, std::vector< T > > 
laplaceButterworthLowPass (unsigned n, const T &cutoff, const T &gain)
template<typename T >
std::pair< std::vector< T >
, std::vector< T > > 
laplaceButterworthHighPass (unsigned n, const T &cutoff, const T &gain)
 LASS_NUM_MATRIX_BINARY_EXPRESSION (Add,+)
 LASS_NUM_MATRIX_BINARY_EXPRESSION (Sub,-)
 LASS_NUM_MATRIX_BINARY_EXPRESSION (Mul,*)
 LASS_NUM_MATRIX_UNARY_EXPRESSION (Neg,-)
 LASS_NUM_MATRIX_UNARY_EXPRESSION (Rec,::lass::num::NumTraits< T >::one/)
template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool ludecomp (RandomIterator1 ioMatrix, RandomIterator2 oIndex, size_t iSize, int &iD)
 Given a complex matrix iA, this routine replaces it by the LU decomposition of a rowwise permutation of itself.
template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 >
void lusolve (RandomIterator1 iMatrix, RandomIterator2 iIndex, RandomIterator3 ioColumn, size_t iSize)
 Solves the set of linear eqautions A X = B.
template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 , typename RandomIterator4 , typename RandomIterator5 >
void lumprove (RandomIterator1 iMatrix, RandomIterator2 iMatrixLU, RandomIterator3 iIndex, RandomIterator4 iColumn, RandomIterator5 ioX, size_t iSize)
 Improves a solution vector X of the linear set of equations A X = B.
template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool cramer2 (RandomIterator1 iMatrixRowMajor, RandomIterator2 ioColumnFirst, RandomIterator2 ioColumnLast)
 Solve A X = B for 2x2 matrices with Cramer's rule.
template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool cramer3 (RandomIterator1 iMatrixRowMajor, RandomIterator2 ioColumnFirst, RandomIterator2 ioColumnLast)
 Solve A X = B for 3x3 matrices with Cramer's rule.
template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 >
bool solveTridiagonal (RandomIterator1 iA, RandomIterator1 iB, RandomIterator1 iC, RandomIterator2 ioSolution, RandomIterator3 ioTemp, std::size_t iSize)
 Solve system of linear equations with a tridiagonal matrix.
 LASS_NUM_VECTOR_BINARY_EXPRESSION (Add,+)
 LASS_NUM_VECTOR_BINARY_EXPRESSION (Sub,-)
 LASS_NUM_VECTOR_BINARY_EXPRESSION (Mul,*)
 LASS_NUM_VECTOR_BINARY_EXPRESSION (Div,/)
 LASS_NUM_VECTOR_UNARY_EXPRESSION (Neg,-)
 LASS_NUM_VECTOR_UNARY_EXPRESSION (Rec,::lass::num::NumTraits< T >::one/)
template<typename C >
numMin4 (const C &k1, const C &k2, const C &k3, const C &k4)
template<typename C >
numMax4 (const C &k1, const C &k2, const C &k3, const C &k4)
template<typename C >
__inline void numMinMax (const C &k1, const C &k2, C &amin, C &amax)
template<typename C >
__inline void numMin (const C &k1, const C &k2, C &amin)
template<typename C >
void numMax (const C &k1, const C &k2, C &amax)

Function Documentation

lass::num::impl::LASS_META_ASSERT ( lass::bitsPerByte  = =8,
one_byte_is_not_8_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tint8)*lass::bitsPerByte  = =8,
Tint8_must_be_8_bits_   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tuint8)*lass::bitsPerByte  = =8,
Tuint8_must_be_8_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tint16)*lass::bitsPerByte  = =16,
Tint16_must_be_16_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tuint16)*lass::bitsPerByte  = =16,
Tuint16_must_be_16_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tint32)*lass::bitsPerByte  = =32,
Tint32_must_be_32_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tuint32)*lass::bitsPerByte  = =32,
Tuint32_must_be_32_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tint64)*lass::bitsPerByte  = =64,
Tint64_must_be_64_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tuint64)*lass::bitsPerByte  = =64,
Tuint64_must_be_64_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tfloat32)*lass::bitsPerByte  = =32,
Tfloat32_must_be_32_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::Tfloat64)*lass::bitsPerByte  = =64,
Tfloat64_must_be_64_bits   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::TintPtr = =sizeof(void *),
TintPtr_must_be_size_of_pointer   
)

lass::num::impl::LASS_META_ASSERT ( sizeof(lass::num::TuintPtr = =sizeof(void *),
TuintPtr_must_be_size_of_pointer   
)

template<typename T , typename ForwardIterator >
num::Polynomial<T> lass::num::impl::laplaceToZHelper ( ForwardIterator  first,
ForwardIterator  last,
const T &  samplingFrequency 
) [inline]

Definition at line 41 of file filters.inl.

References lass::prim::distance(), and lass::stde::T.

Referenced by laplaceToZ().

template<typename T , typename ForwardIterator1 , typename ForwardIterator2 >
std::pair< std::vector<T>, std::vector<T> > lass::num::impl::laplaceToZ ( ForwardIterator1  numeratorFirst,
ForwardIterator1  numeratorLast,
ForwardIterator2  denominatorFirst,
ForwardIterator2  denominatorLast,
const T &  samplingFrequency 
) [inline]

template<typename T >
std::pair< std::vector<T>, std::vector<T> > lass::num::impl::laplaceButterworthLowPass ( unsigned  n,
const T &  cutoff,
const T &  gain 
) [inline]

template<typename T >
std::pair< std::vector<T>, std::vector<T> > lass::num::impl::laplaceButterworthHighPass ( unsigned  n,
const T &  cutoff,
const T &  gain 
) [inline]

lass::num::impl::LASS_NUM_MATRIX_BINARY_EXPRESSION ( Add  ,
 
)

lass::num::impl::LASS_NUM_MATRIX_BINARY_EXPRESSION ( Sub  ,
 
)

lass::num::impl::LASS_NUM_MATRIX_BINARY_EXPRESSION ( Mul  ,
 
)

lass::num::impl::LASS_NUM_MATRIX_UNARY_EXPRESSION ( Neg  ,
 
)

lass::num::impl::LASS_NUM_MATRIX_UNARY_EXPRESSION ( Rec  ,
::lass::num::NumTraits< T >::one/   
)

template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool lass::num::impl::ludecomp ( RandomIterator1  ioMatrix,
RandomIterator2  oIndex,
size_t  iSize,
int &  iD 
) [inline]

Given a complex matrix iA, this routine replaces it by the LU decomposition of a rowwise permutation of itself.

Parameters:
ioMatrix [in,out]
  • Random iterator to first element of of a square matrix in row major order.
  • ioMatrix is replaced by its LU decomposition.
  • [ioMatrix, ioMatrix + iSize * iSize) must be a valid range
oIndex [out]
  • records the row permutations effected by the partial pivoting.
  • [oIndex, oIndex + iSize) must be a valid range.
iSize [in]
  • size of matrix
oD [out]
  • indicates the number of row interchanges was even (+1) or odd (-1).
Returns:
- true: LU decomposition completed
  • false: matrix ioMatrix is singular
This routine is used in combination with lusolve() to solve linear equations and lumprove() to improve the solution.

Method: Crout's algorithm with partial pivoting.

Definition at line 85 of file matrix_solve.inl.

References lass::num::conj(), LASS_ASSERT, lass::num::norm(), std::swap(), and lass::stde::T.

Referenced by lass::num::Matrix< T, S >::invert().

template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 >
void lass::num::impl::lusolve ( RandomIterator1  iMatrix,
RandomIterator2  iIndex,
RandomIterator3  ioColumn,
size_t  iSize 
) [inline]

Solves the set of linear eqautions A X = B.

Definition at line 222 of file matrix_solve.inl.

References lass::stde::T.

Referenced by lass::num::Matrix< T, S >::invert(), and lumprove().

template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 , typename RandomIterator4 , typename RandomIterator5 >
void lass::num::impl::lumprove ( RandomIterator1  iMatrix,
RandomIterator2  iMatrixLU,
RandomIterator3  iIndex,
RandomIterator4  iColumn,
RandomIterator5  ioX,
size_t  iSize 
) [inline]

Improves a solution vector X of the linear set of equations A X = B.

Definition at line 297 of file matrix_solve.inl.

References lusolve().

template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool lass::num::impl::cramer2 ( RandomIterator1  iMatrixRowMajor,
RandomIterator2  ioColumnFirst,
RandomIterator2  ioColumnLast 
) [inline]

Solve A X = B for 2x2 matrices with Cramer's rule.

Parameters:
iMatrix [in]
  • Random iterator to first element of matrix A in row major order.
  • A must be of size 2x2.
  • [iMatrix, iMatrix + 4) must be a valid range
ioColumn [in,out]
  • Random iterator to first element of B as input
  • Random iterator to first element of X as output
  • [iColumn, iColumn + 2) must be a valid range

Definition at line 344 of file matrix_solve.inl.

References lass::num::inv(), LASS_ASSERT, and lass::stde::T.

template<typename T , typename RandomIterator1 , typename RandomIterator2 >
bool lass::num::impl::cramer3 ( RandomIterator1  iMatrixRowMajor,
RandomIterator2  ioColumnFirst,
RandomIterator2  ioColumnLast 
) [inline]

Solve A X = B for 3x3 matrices with Cramer's rule.

Definition at line 390 of file matrix_solve.inl.

References lass::num::inv(), LASS_ASSERT, and lass::stde::T.

template<typename T , typename RandomIterator1 , typename RandomIterator2 , typename RandomIterator3 >
bool lass::num::impl::solveTridiagonal ( RandomIterator1  iA_1,
RandomIterator1  iB_0,
RandomIterator1  iC_0,
RandomIterator2  ioSolution,
RandomIterator3  ioTemp,
std::size_t  iSize 
) [inline]

Solve system of linear equations with a tridiagonal matrix.

Definition at line 460 of file matrix_solve.inl.

References lass::stde::T.

lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION ( Add  ,
 
)

lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION ( Sub  ,
 
)

lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION ( Mul  ,
 
)

lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION ( Div  ,
 
)

lass::num::impl::LASS_NUM_VECTOR_UNARY_EXPRESSION ( Neg  ,
 
)

lass::num::impl::LASS_NUM_VECTOR_UNARY_EXPRESSION ( Rec  ,
::lass::num::NumTraits< T >::one/   
)

template<typename C >
C lass::num::impl::numMin4 ( const C &  k1,
const C &  k2,
const C &  k3,
const C &  k4 
) [inline]

Definition at line 498 of file interval.h.

template<typename C >
C lass::num::impl::numMax4 ( const C &  k1,
const C &  k2,
const C &  k3,
const C &  k4 
) [inline]

Definition at line 512 of file interval.h.

template<typename C >
__inline void lass::num::impl::numMinMax ( const C &  k1,
const C &  k2,
C &  amin,
C &  amax 
) [inline]

Definition at line 526 of file interval.h.

template<typename C >
__inline void lass::num::impl::numMin ( const C &  k1,
const C &  k2,
C &  amin 
) [inline]

Definition at line 540 of file interval.h.

template<typename C >
void lass::num::impl::numMax ( const C &  k1,
const C &  k2,
C &  amax 
) [inline]

Definition at line 548 of file interval.h.


Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo