Tutorial_ArrayClass_interop.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 6 of file Tutorial_ArrayClass_interop.cpp.

7 {
8  MatrixXf m(2,2);
9  MatrixXf n(2,2);
10  MatrixXf result(2,2);
11 
12  m << 1,2,
13  3,4;
14  n << 5,6,
15  7,8;
16 
17  result = (m.array() + 4).matrix() * m;
18  std::cout << "-- Combination 1: --\n" << result << "\n\n";
19  result = (m.array() * n.array()).matrix() * m;
20  std::cout << "-- Combination 2: --\n" << result << "\n\n";
21 }
Matrix3f m
int n
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.
Definition: Matrix.h:501