Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
doc
examples
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
}
b
Scalar * b
Definition:
benchVecAdd.cpp:17
v
ArrayXcf v
Definition:
Cwise_arg.cpp:1
main
int main()
Definition:
tut_arithmetic_add_sub.cpp:6
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
a
Array33i a
Definition:
Cwise_product.cpp:1
w
RowVector3d w
Definition:
Matrix_resize_int.cpp:3
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:19