tut_arithmetic_scalar_mul_div.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  Vector3d v(1,2,3);
12  std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl;
13  std::cout << "0.1 * v =\n" << 0.1 * v << std::endl;
14  std::cout << "Doing v *= 2;" << std::endl;
15  v *= 2;
16  std::cout << "Now v =\n" << v << std::endl;
17 }
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
main
int main()
Definition: tut_arithmetic_scalar_mul_div.cpp:6
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1


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