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

Functions

template<typename Derived >
Eigen::Reshaped< Derived, 4, 2 > reshape_helper (Eigen::MatrixBase< Derived > &m)
 
int main (int, char **)
 

Function Documentation

◆ main()

int main ( int  ,
char **   
)
9  {
10  Eigen::MatrixXd m(2, 4);
11  m << 1, 2, 3, 4, 5, 6, 7, 8;
12  Eigen::MatrixXd n = reshape_helper(m);
13  std::cout << "matrix m is:" << std::endl << m << std::endl;
14  std::cout << "matrix n is:" << std::endl << n << std::endl;
15  return 0;
16 }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Eigen::Reshaped< Derived, 4, 2 > reshape_helper(Eigen::MatrixBase< Derived > &m)
Definition: class_FixedReshaped.cpp:5
int * m
Definition: level2_cplx_impl.h:294

References m, n, and reshape_helper().

◆ reshape_helper()

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

References m.

Referenced by main().