diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-17 12:12:40 +0100 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-17 12:12:40 +0100 |
commit | 9196b6b659a4dddc92da9a683af94726120d6ac9 (patch) | |
tree | 4d1551e490903b9dc771df3f43ac36350570b178 /doc/examples/QuickStart_example2_fixed.cpp | |
parent | 7fdf2189516e2d4548c04ed4e18b7a28c28eb77c (diff) |
Add second example to QuickStart guide.
Also, some changes suggested by Keir and Benoit on mailing list.
Diffstat (limited to 'doc/examples/QuickStart_example2_fixed.cpp')
-rw-r--r-- | doc/examples/QuickStart_example2_fixed.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/examples/QuickStart_example2_fixed.cpp b/doc/examples/QuickStart_example2_fixed.cpp new file mode 100644 index 000000000..6d7d63d15 --- /dev/null +++ b/doc/examples/QuickStart_example2_fixed.cpp @@ -0,0 +1,15 @@ +#include <iostream> +#include <Eigen/Dense> + +using Eigen::Matrix3d; +using Eigen::Vector3d; + +int main(int, char *[]) +{ + Matrix3d m; + for (int rowIndex = 0; rowIndex < 3; ++rowIndex) + for (int columnIndex = 0; columnIndex < 3; ++columnIndex) + m(rowIndex, columnIndex) = rowIndex + 0.01 * columnIndex; + Vector3d v = Vector3d::Ones(); + std::cout << m * v << std::endl; +} |