tut_arithmetic_add_sub.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <Eigen/Dense>
3 
4 using namespace Eigen;
5 
6 int main()
7 {
8  Matrix2d a;
9  a << 1, 2,
10  3, 4;
11  MatrixXd b(2,2);
12  b << 2, 3,
13  1, 4;
14  std::cout << "a + b =\n" << a + b << std::endl;
15  std::cout << "a - b =\n" << a - b << std::endl;
16  std::cout << "Doing a += b;" << std::endl;
17  a += b;
18  std::cout << "Now a =\n" << a << std::endl;
19  Vector3d v(1,2,3);
20  Vector3d w(1,0,0);
21  std::cout << "-v + w - v =\n" << -v + w - v << std::endl;
22 }
Scalar * b
Definition: benchVecAdd.cpp:17
ArrayXcf v
Definition: Cwise_arg.cpp:1
int main()
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Array33i a
RowVector3d w


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:19