Tutorial_ArrayClass_accessors.cpp
Go to the documentation of this file.
1 #include <Eigen/Dense>
2 #include <iostream>
3 
4 using namespace Eigen;
5 using namespace std;
6 
7 int main()
8 {
9  ArrayXXf m(2,2);
10 
11  // assign some values coefficient by coefficient
12  m(0,0) = 1.0; m(0,1) = 2.0;
13  m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0);
14 
15  // print values to standard output
16  cout << m << endl << endl;
17 
18  // using the comma-initializer is also allowed
19  m << 1.0,2.0,
20  3.0,4.0;
21 
22  // print values to standard output
23  cout << m << endl;
24 }
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