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. More...
template<class T >
Mat< T > | itpp::reshape (const Vec< T > &v, int rows, int cols)
| Reshape the vector into an rows*cols matrix. More...

## Detailed Description

## Function Documentation

## reshape() [1/2]

template<class T >

Mat<T> itpp::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 822 of file matfunc.h.

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

Referenced by fpica(), and itpp::reshape().

## reshape() [2/2]

template<class T >

Mat<T> itpp::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 846 of file matfunc.h.

References itpp::all(), itpp::any(), itpp::bidiag(), itpp::cross(), itpp::cumsum(), itpp::cvectorize(), itpp::diag(), itpp::hermitian_transpose(), itpp::is_hermitian(), itpp::is_unitary(), it_assert_debug, itpp::kron(), itpp::length(), itpp::prod(), itpp::reshape(), itpp::reverse(), itpp::rvectorize(), itpp::Vec< Num_T >::size(), itpp::sum(), itpp::sum_sqr(), itpp::sumsum(), itpp::trace(), itpp::transpose(), itpp::tridiag(), and itpp::zero_pad().

Generated on Sat Sep 30 2017 07:04:09 for IT++ by Doxygen 1.8.13