Tutorial_ArrayClass_accessors.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file Tutorial_ArrayClass_accessors.cpp.

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 }
Matrix3f m
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:49