blob: 631c9a5e04b009a33007249a2f99ef5e95bfc4aa [file] [log] [blame]
Brian Silverman72890c22015-09-19 14:37:37 -04001#include <iostream>
2#include <Eigen/Dense>
3
4using namespace Eigen;
5using namespace std;
6int 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}