Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
doc
examples
tut_arithmetic_dot_cross.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <Eigen/Dense>
3
4
using namespace
Eigen
;
5
using namespace
std
;
6
int
main
()
7
{
8
Vector3d
v
(1,2,3);
9
Vector3d
w
(0,1,2);
10
11
cout <<
"Dot product: "
<< v.dot(w) << endl;
12
double
dp = v.adjoint()*
w
;
// automatic conversion of the inner product to a scalar
13
cout <<
"Dot product via a matrix product: "
<< dp << endl;
14
cout <<
"Cross product:\n"
<< v.cross(w) << endl;
15
}
v
ArrayXcf v
Definition:
Cwise_arg.cpp:1
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
std
Definition:
Half.h:150
main
int main()
Definition:
tut_arithmetic_dot_cross.cpp:6
w
RowVector3d w
Definition:
Matrix_resize_int.cpp:3
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:19