00001 #include <iostream> 00002 #include <Eigen/Dense> 00003 00004 using namespace Eigen; 00005 00006 int main() 00007 { 00008 Matrix2d a; 00009 a << 1, 2, 00010 3, 4; 00011 Vector3d v(1,2,3); 00012 std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; 00013 std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; 00014 std::cout << "Doing v *= 2;" << std::endl; 00015 v *= 2; 00016 std::cout << "Now v =\n" << v << std::endl; 00017 }