class_Reshaped.cpp File Reference
#include <Eigen/Core>
#include <iostream>

Functions

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

Function Documentation

◆ main()

int main ( int  ,
char **   
)
9  {
10  Eigen::MatrixXd m(3, 4);
11  m << 1, 4, 7, 10, 2, 5, 8, 11, 3, 6, 9, 12;
12  std::cout << m << std::endl;
14  std::cout << "Matrix m is:" << std::endl << m << std::endl;
15  std::cout << "Matrix n is:" << std::endl << n << std::endl;
16 }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
const Eigen::Reshaped< const Derived > reshape_helper(const Eigen::MatrixBase< Derived > &m, int rows, int cols)
Definition: class_Reshaped.cpp:5
int * m
Definition: level2_cplx_impl.h:294

References m, n, and reshape_helper().

◆ reshape_helper()

template<typename Derived >
const Eigen::Reshaped<const Derived> reshape_helper ( const Eigen::MatrixBase< Derived > &  m,
int  rows,
int  cols 
)
5  {
6  return Eigen::Reshaped<const Derived>(m.derived(), rows, cols);
7 }
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
Expression of a fixed-size or dynamic-size reshape.
Definition: Reshaped.h:99

References cols, m, and rows.

Referenced by main().