Eigen 3.4.90
doc
examples
tut_arithmetic_scalar_mul_div.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <
Eigen/Dense
>
3
4
int
main
()
5
{
6
Eigen::Matrix2d
a
;
7
a
<< 1, 2,
8
3, 4;
9
Eigen::Vector3d
v
(1,2,3);
10
std::cout <<
"a * 2.5 =\n"
<<
a
* 2.5 << std::endl;
11
std::cout <<
"0.1 * v =\n"
<< 0.1 *
v
<< std::endl;
12
std::cout <<
"Doing v *= 2;"
<< std::endl;
13
v
*= 2;
14
std::cout <<
"Now v =\n"
<<
v
<< std::endl;
15
}
a
ArrayXXi a
Definition:
Array_initializer_list_23_cxx11.cpp:1
v
Array< int, Dynamic, 1 > v
Definition:
Array_initializer_list_vector_cxx11.cpp:1
Dense
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
Matrix.h:182
main
int main()
Definition:
tut_arithmetic_scalar_mul_div.cpp:4