From 140ad0908d9646c3c44dfe65ee4274c12c324770 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Mon, 12 Jul 2010 22:45:57 +0100 Subject: Tutorial page 3: add more cwise operations, condense rest. --- doc/examples/Tutorial_ArrayClass_cwise_other.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/examples/Tutorial_ArrayClass_cwise_other.cpp (limited to 'doc/examples/Tutorial_ArrayClass_cwise_other.cpp') diff --git a/doc/examples/Tutorial_ArrayClass_cwise_other.cpp b/doc/examples/Tutorial_ArrayClass_cwise_other.cpp new file mode 100644 index 000000000..d9046c63d --- /dev/null +++ b/doc/examples/Tutorial_ArrayClass_cwise_other.cpp @@ -0,0 +1,19 @@ +#include +#include + +using namespace Eigen; +using namespace std; + +int main() +{ + ArrayXf a = ArrayXf::Random(5); + a *= 2; + cout << "a =" << endl + << a << endl; + cout << "a.abs() =" << endl + << a.abs() << endl; + cout << "a.abs().sqrt() =" << endl + << a.abs().sqrt() << endl; + cout << "a.min(a.abs().sqrt()) =" << endl + << a.min(a.abs().sqrt()) << endl; +} -- cgit v1.2.3