diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-06-27 19:37:16 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-06-27 19:37:16 +0200 |
commit | b5659dc9cf6f895c41c6119c06df1ba7c7f71367 (patch) | |
tree | 33b6de7207b1567797b3de0777eedc5888a31161 /doc/examples/QuickStart_example2_fixed.cpp | |
parent | 189d4b51c2280281bf93502db959899c2c097957 (diff) |
show a more fancy example for the getting started tut
Diffstat (limited to 'doc/examples/QuickStart_example2_fixed.cpp')
-rw-r--r-- | doc/examples/QuickStart_example2_fixed.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/examples/QuickStart_example2_fixed.cpp b/doc/examples/QuickStart_example2_fixed.cpp index c30f47734..edf3268cd 100644 --- a/doc/examples/QuickStart_example2_fixed.cpp +++ b/doc/examples/QuickStart_example2_fixed.cpp @@ -1,15 +1,15 @@ #include <iostream> #include <Eigen/Dense> -using Eigen::Matrix3d; -using Eigen::Vector3d; +using namespace Eigen; +using namespace std; int main() { - Matrix3d m; - for (int row = 0; row < 3; ++row) - for (int column = 0; column < 3; ++column) - m(row, column) = row + 0.01 * column; - Vector3d v = Vector3d::Ones(); - std::cout << m * v << std::endl; + Matrix3f m = Matrix3f::Random(); + m = (m + Matrix3f::Constant(1.2)) * 50; + cout << "m =" << endl << m << endl; + Vector3f v(1,2,3); + + cout << "m * v =" << endl << m * v << endl; } |