gtsam
3rdparty
Eigen
doc
examples
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
}
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
main
int main()
Definition:
Tutorial_BlockOperations_block_assignment.cpp:7
m
Matrix3f m
Definition:
AngleAxis_mimic_euler.cpp:1
a
ArrayXXi a
Definition:
Array_initializer_list_23_cxx11.cpp:1
std
Definition:
BFloat16.h:88
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:19