From 44861dcbfeee041223c4aac1ee075e92fa4daa01 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 18 Sep 2016 12:42:15 +0200 Subject: update --- .../doc/examples/Tutorial_ArrayClass_cwise_other.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp (limited to 'eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp') diff --git a/eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp b/eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp new file mode 100644 index 0000000..d9046c6 --- /dev/null +++ b/eigen/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