IT++ Logo Newcom Logo

Reshaping of Vectors and Matrices


Functions

template<class T>
Vec< T > itpp::reverse (const Vec< T > &in)
 Reverse the input vector.
template<class T>
Vec< T > itpp::rvectorize (const Mat< T > &m)
 Row vectorize the matrix [(0,0) (0,1) ... (N-1,N-2) (N-1,N-1)].
template<class T>
Vec< T > itpp::cvectorize (const Mat< T > &m)
 Column vectorize the matrix [(0,0) (1,0) ... (N-2,N-1) (N-1,N-1)].
template<class T>
Mat< T > itpp::reshape (const Mat< T > &m, int rows, int cols)
 Reshape the matrix into an rows*cols matrix.
template<class T>
Mat< T > itpp::reshape (const Vec< T > &v, int rows, int cols)
 Reshape the vector into an rows*cols matrix.

Function Documentation

template<class T>
Vec<T> reverse const Vec< T > &  in  ) 
 

Reverse the input vector.

Definition at line 667 of file matfunc.h.

Referenced by itpp::CRC_Code::check_parity(), itpp::dec2bin(), itpp::filter_design_autocorrelation(), itpp::graycode(), itpp::jake_filter(), itpp::modified_yule_walker(), and itpp::CRC_Code::parity().

template<class T>
Vec<T> rvectorize const Mat< T > &  m  ) 
 

Row vectorize the matrix [(0,0) (0,1) ... (N-1,N-2) (N-1,N-1)].

Definition at line 679 of file matfunc.h.

template<class T>
Vec<T> cvectorize const Mat< T > &  m  ) 
 

Column vectorize the matrix [(0,0) (1,0) ... (N-2,N-1) (N-1,N-1)].

Definition at line 693 of file matfunc.h.

template<class T>
Mat<T> reshape const Mat< T > &  m,
int  rows,
int  cols
 

Reshape the matrix into an rows*cols matrix.

The data is taken columnwise from the original matrix and written columnwise into the new matrix.

Definition at line 712 of file matfunc.h.

References it_assert1.

template<class T>
Mat<T> reshape const Vec< T > &  v,
int  rows,
int  cols
 

Reshape the vector into an rows*cols matrix.

The data is element by element from the vector and written columnwise into the new matrix.

Definition at line 735 of file matfunc.h.

References it_assert1.

Referenced by itpp::toeplitz().

SourceForge Logo

Generated on Fri Jan 11 08:51:41 2008 for IT++ by Doxygen 1.3.9.1