Reshaping of Vectors and Matrices
[Base Module]


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 >
Mat<T> itpp::reshape ( const Vec< T > &  v,
int  rows,
int  cols 
) [inline]

Reshape the vector into an rows*cols matrix.

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

References it_assert_debug, and itpp::Vec< Num_T >::size().

Referenced by bdm::egiw::evallog_nn().

template<class T >
Mat<T> itpp::reshape ( const Mat< T > &  m,
int  rows,
int  cols 
) [inline]

Reshape the matrix into an rows*cols matrix.

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

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().


Generated on Tue Jun 2 10:02:14 2009 for mixpp by  doxygen 1.5.8