aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/MatrixFunctions
diff options
context:
space:
mode:
authorGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-08-28 01:55:13 +0800
committerGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-08-28 01:55:13 +0800
commitba4e886376382ca29b5ae6b9f31b869805ab415a (patch)
tree1fc07956bc2ec7b7ba66072650406066531f6534 /unsupported/Eigen/MatrixFunctions
parent5252d823c92dd2db388869e097eac9b1501488ce (diff)
Tidy up and write dox.
Diffstat (limited to 'unsupported/Eigen/MatrixFunctions')
-rw-r--r--unsupported/Eigen/MatrixFunctions12
1 files changed, 10 insertions, 2 deletions
diff --git a/unsupported/Eigen/MatrixFunctions b/unsupported/Eigen/MatrixFunctions
index 041d3b7ec..002c1f71c 100644
--- a/unsupported/Eigen/MatrixFunctions
+++ b/unsupported/Eigen/MatrixFunctions
@@ -223,8 +223,7 @@ Output: \verbinclude MatrixLogarithm.out
Compute the matrix raised to arbitrary real power.
\code
-template <typename ExponentType>
-const MatrixPowerReturnValue<Derived, ExponentType> MatrixBase<Derived>::pow(const ExponentType& p) const
+const MatrixPowerReturnValue<Derived> MatrixBase<Derived>::pow(RealScalar p) const
\endcode
\param[in] M base of the matrix power, should be a square matrix.
@@ -247,6 +246,15 @@ diagonal and the first super-diagonal is directly computed.
The actual work is done by the MatrixPower class, which can compute
\f$ M^p v \f$, where \p v is another matrix with the same rows as
\p M. The matrix \p v is set to be the identity matrix by default.
+Therefore, the expression <tt>M.pow(p) * v</tt> is specialized for
+this. No temporary storage is created for the result. The code below
+directly evaluates R-values into L-values without aliasing issue. Do
+\b NOT try to \a optimize with noalias(). It won't compile.
+\code
+v = m.pow(p) * v;
+m = m.pow(q);
+// v2.noalias() = m.pow(p) * v1; Won't compile!
+\endcode
Details of the algorithm can be found in: Nicholas J. Higham and
Lijing Lin, "A Schur-Pad&eacute; algorithm for fractional powers of a