diff options
author | Chen-Pang He <jdh8@ms63.hinet.net> | 2012-09-21 23:24:28 +0800 |
---|---|---|
committer | Chen-Pang He <jdh8@ms63.hinet.net> | 2012-09-21 23:24:28 +0800 |
commit | 87afd99433b6a8a6c5e4fa4bb788ccc020ff7090 (patch) | |
tree | 495239e8fbb7e72cdc4b51ab3b7d662e68967daa /unsupported/doc | |
parent | d5d99dd1f001b6bb05d530ab40e455a69703dcc6 (diff) |
Enable saving intermidiate (Schur decomposition) but disable unstable specialization for matrix power-matrix product.
Diffstat (limited to 'unsupported/doc')
-rw-r--r-- | unsupported/doc/examples/MatrixPower.cpp | 2 | ||||
-rw-r--r-- | unsupported/doc/examples/MatrixPower_optimal.cpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/unsupported/doc/examples/MatrixPower.cpp b/unsupported/doc/examples/MatrixPower.cpp index 6ade0b8af..222452476 100644 --- a/unsupported/doc/examples/MatrixPower.cpp +++ b/unsupported/doc/examples/MatrixPower.cpp @@ -11,6 +11,6 @@ int main() sin(1), cos(1), 0, 0 , 0 , 1; std::cout << "The matrix A is:\n" << A << "\n\n" - << "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl; + "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl; return 0; } diff --git a/unsupported/doc/examples/MatrixPower_optimal.cpp b/unsupported/doc/examples/MatrixPower_optimal.cpp new file mode 100644 index 000000000..86470ba0a --- /dev/null +++ b/unsupported/doc/examples/MatrixPower_optimal.cpp @@ -0,0 +1,17 @@ +#include <unsupported/Eigen/MatrixFunctions> +#include <iostream> + +using namespace Eigen; + +int main() +{ + Matrix4cd A = Matrix4cd::Random(); + MatrixPower<Matrix4cd> Apow(A); + + std::cout << "The matrix A is:\n" << A << "\n\n" + "A^3.1 is:\n" << Apow(3.1) << "\n\n" + "A^3.3 is:\n" << Apow(3.3) << "\n\n" + "A^3.7 is:\n" << Apow(3.7) << "\n\n" + "A^3.9 is:\n" << Apow(3.9) << std::endl; + return 0; +} |