Eigen 3.4.90
doc
examples
Tutorial_ArrayClass_accessors.cpp
Go to the documentation of this file.
1
#include <
Eigen/Dense
>
2
#include <iostream>
3
4
int
main
()
5
{
6
Eigen::ArrayXXf
m
(2,2);
7
8
// assign some values coefficient by coefficient
9
m
(0,0) = 1.0;
m
(0,1) = 2.0;
10
m
(1,0) = 3.0;
m
(1,1) =
m
(0,1) +
m
(1,0);
11
12
// print values to standard output
13
std::cout <<
m
<< std::endl << std::endl;
14
15
// using the comma-initializer is also allowed
16
m
<< 1.0,2.0,
17
3.0,4.0;
18
19
// print values to standard output
20
std::cout <<
m
<< std::endl;
21
}
m
Matrix3f m
Definition:
AngleAxis_mimic_euler.cpp:1
Dense
main
int main()
Definition:
Tutorial_ArrayClass_accessors.cpp:4
Eigen::Array
General-purpose arrays with easy API for coefficient-wise operations.
Definition:
Array.h:49