aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/MatrixFunctions
diff options
context:
space:
mode:
authorGravatar Chen-Pang He <jdh8@ms63.hinet.net>2013-07-21 00:18:19 +0800
committerGravatar Chen-Pang He <jdh8@ms63.hinet.net>2013-07-21 00:18:19 +0800
commit3d94ed9fa0bc06771c39970bcae6705ca2524cad (patch)
tree9961aa764ddab10f8e1f424dc88e124ce82afd29 /unsupported/Eigen/src/MatrixFunctions
parentede27f5780880e5fb89662d11db5a0e3b5586766 (diff)
Document on MatrixExponential::ScalingOp
Diffstat (limited to 'unsupported/Eigen/src/MatrixFunctions')
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
index 810f426f9..30b36a179 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -126,6 +126,7 @@ class MatrixExponential : internal::noncopyable
*/
void computeUV(long double);
+ struct ScalingOp;
typedef typename internal::traits<MatrixType>::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef typename std::complex<RealScalar> ComplexScalar;
@@ -153,22 +154,35 @@ class MatrixExponential : internal::noncopyable
/** \brief L1 norm of m_M. */
RealScalar m_l1norm;
-
- /** \brief Scaling operator. */
- struct ScalingOp;
};
+/** \brief Scaling operator.
+ *
+ * This struct is used by CwiseUnaryOp to scale a matrix by \f$ 2^{-s} \f$.
+ */
template <typename MatrixType>
struct MatrixExponential<MatrixType>::ScalingOp
{
+ /** \brief Constructor.
+ *
+ * \param[in] squarings The integer \f$ s \f$ in this document.
+ */
ScalingOp(int squarings) : m_squarings(squarings) { }
+ /** \brief Scale a matrix coefficient.
+ *
+ * \param[in,out] x The scalar to be scaled, becoming \f$ 2^{-s} x \f$.
+ */
inline const RealScalar operator() (const RealScalar& x) const
{
using std::ldexp;
return ldexp(x, -m_squarings);
}
+ /** \brief Scale a matrix coefficient.
+ *
+ * \param[in,out] x The scalar to be scaled, becoming \f$ 2^{-s} x \f$.
+ */
inline const ComplexScalar operator() (const ComplexScalar& x) const
{
using std::ldexp;