class_FixedReshaped.cpp
Go to the documentation of this file.
1 #include <Eigen/Core>
2 #include <iostream>
3 
4 template<typename Derived>
7 {
8  return Eigen::Reshaped<Derived, 4, 2>(m.derived());
9 }
10 
11 int main(int, char**)
12 {
13  Eigen::MatrixXd m(2, 4);
14  m << 1, 2, 3, 4,
15  5, 6, 7, 8;
17  std::cout << "matrix m is:" << std::endl << m << std::endl;
18  std::cout << "matrix n is:" << std::endl << n << std::endl;
19  return 0;
20 }
Matrix3f m
int n
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
Expression of a fixed-size or dynamic-size reshape.
Definition: Reshaped.h:99
int main(int, char **)
Eigen::Reshaped< Derived, 4, 2 > reshape_helper(Eigen::MatrixBase< Derived > &m)