diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-12-20 21:11:05 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-12-20 21:11:05 +0000 |
commit | 647a817b2e352ae8f3599ba393d344f83d3b416e (patch) | |
tree | 439f62c6d8a5d1ec4315e67b729633b16be8aaf1 /doc | |
parent | cddeeee17d0bac36f9fa0fa8177792b6ce7a2c35 (diff) |
more documentation and examples, add Doxyfile and Mainpage.dox and also
the benchmark program
Diffstat (limited to 'doc')
-rw-r--r-- | doc/benchmark.cpp | 23 | ||||
-rw-r--r-- | doc/examples/function_dynBlock.cpp | 19 |
2 files changed, 42 insertions, 0 deletions
diff --git a/doc/benchmark.cpp b/doc/benchmark.cpp new file mode 100644 index 000000000..ae2a52e9c --- /dev/null +++ b/doc/benchmark.cpp @@ -0,0 +1,23 @@ +// g++ -O3 -DNDEBUG benchmark.cpp -o benchmark && time ./benchmark + +#include "src/Core.h" + +using namespace std; +USING_EIGEN_DATA_TYPES + +int main(int argc, char *argv[]) +{ + Matrix3d I; + Matrix3d m; + for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) + { + I(i,j) = (i==j); + m(i,j) = (i+3*j); + } + for(int a = 0; a < 100000000; a++) + { + m = I + 0.00005 * (m + m*m); + } + cout << m << endl; + return 0; +} diff --git a/doc/examples/function_dynBlock.cpp b/doc/examples/function_dynBlock.cpp new file mode 100644 index 000000000..bd3cbae1f --- /dev/null +++ b/doc/examples/function_dynBlock.cpp @@ -0,0 +1,19 @@ +#include "../src/Core.h" +USING_EIGEN_DATA_TYPES +using namespace std; +int main(int, char**) +{ + Matrix4d m = Matrix4d::identity(); + m.dynBlock(2,0,2,2) = m.dynBlock(0,0,2,2); + cout << m << endl; + return 0; +} + +/* Output: + +1 0 0 0 +0 1 0 0 +1 0 1 0 +0 1 0 1 + +*/ |