Go to the source code of this file.
◆ main()
Definition at line 4 of file tut_arithmetic_dot_cross.cpp.
9 std::cout <<
"Dot product: " <<
v.dot(
w) << std::endl;
10 double dp =
v.adjoint()*
w;
11 std::cout <<
"Dot product via a matrix product: " << dp << std::endl;
13 std::cout <<
"Cross product:\n" <<
v.cross(
w) << std::endl;
16 double cp =
v2.cross(w2);
17 std::cout <<
"Cross product for 2D vectors: " << cp << std::endl;
Array< int, Dynamic, 1 > v
Map< RowVectorXf > v2(M2.data(), M2.size())
The matrix class, also used for vectors and row-vectors.