tut_arithmetic_dot_cross.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace Eigen;
00005 using namespace std;
00006 int main()
00007 {
00008   Vector3d v(1,2,3);
00009   Vector3d w(0,1,2);
00010 
00011   cout << "Dot product: " << v.dot(w) << endl;
00012   double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar
00013   cout << "Dot product via a matrix product: " << dp << endl;
00014   cout << "Cross product:\n" << v.cross(w) << endl;
00015 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:27