Tutorial_ArrayClass_addition.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_addition.cpp.

5 {
6  Eigen::ArrayXXf a(3,3);
7  Eigen::ArrayXXf b(3,3);
8  a << 1,2,3,
9  4,5,6,
10  7,8,9;
11  b << 1,2,3,
12  1,2,3,
13  1,2,3;
14 
15  // Adding two arrays
16  std::cout << "a + b = " << std::endl << a + b << std::endl << std::endl;
17 
18  // Subtracting a scalar from an array
19  std::cout << "a - 2 = " << std::endl << a - 2 << std::endl;
20 }
Array< int, 3, 1 > b
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:49