class_Reshaped.cpp File Reference

Go to the source code of this file.

Functions

int main (int, char **)
 
template<typename Derived >
const Eigen::Reshaped< const Derived > reshape_helper (const Eigen::MatrixBase< Derived > &m, int rows, int cols)
 

Function Documentation

◆ main()

int main ( int  ,
char **   
)

Definition at line 11 of file class_Reshaped.cpp.

12 {
13  Eigen::MatrixXd m(3, 4);
14  m << 1, 4, 7, 10,
15  2, 5, 8, 11,
16  3, 6, 9, 12;
17  std::cout << m << std::endl;
19  std::cout << "Matrix m is:" << std::endl << m << std::endl;
20  std::cout << "Matrix n is:" << std::endl << n << std::endl;
21 }
Matrix3f m
int n
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:285
const Eigen::Reshaped< const Derived > reshape_helper(const Eigen::MatrixBase< Derived > &m, int rows, int cols)

◆ reshape_helper()

template<typename Derived >
const Eigen::Reshaped<const Derived> reshape_helper ( const Eigen::MatrixBase< Derived > &  m,
int  rows,
int  cols 
)

Definition at line 6 of file class_Reshaped.cpp.

7 {
8  return Eigen::Reshaped<const Derived>(m.derived(), rows, cols);
9 }
Expression of a fixed-size or dynamic-size reshape.
Definition: Reshaped.h:99