Tutorial_BlockOperations_block_assignment.cpp
Go to the documentation of this file.
1 #include <Eigen/Dense>
2 #include <iostream>
3 
4 using namespace std;
5 using namespace Eigen;
6 
7 int main()
8 {
9  Array22f m;
10  m << 1,2,
11  3,4;
12  Array44f a = Array44f::Constant(0.6);
13  cout << "Here is the array a:" << endl << a << endl << endl;
14  a.block<2,2>(1,1) = m;
15  cout << "Here is now a with m copied into its central 2x2 block:" << endl << a << endl << endl;
16  a.block(0,0,2,3) = a.block(2,1,2,3);
17  cout << "Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:" << endl << a << endl << endl;
18 }
Matrix3f m
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Definition: BFloat16.h:88


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:38