Tutorial_ArrayClass_interop.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  MatrixXf m(2,2);
10  MatrixXf n(2,2);
11  MatrixXf result(2,2);
12 
13  m << 1,2,
14  3,4;
15  n << 5,6,
16  7,8;
17 
18  result = (m.array() + 4).matrix() * m;
19  cout << "-- Combination 1: --" << endl << result << endl << endl;
20  result = (m.array() * n.array()).matrix() * m;
21  cout << "-- Combination 2: --" << endl << result << endl << endl;
22 }
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
main
int main()
Definition: Tutorial_ArrayClass_interop.cpp:7
result
Values result
Definition: OdometryOptimize.cpp:8
n
int n
Definition: BiCGSTAB_simple.cpp:1
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
matrix
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: gtsam/3rdparty/Eigen/blas/common.h:110
std
Definition: BFloat16.h:88


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:19