10 #ifndef EIGEN_MATRIX_FUNCTION_ATOMIC 11 #define EIGEN_MATRIX_FUNCTION_ATOMIC 23 template <
typename MatrixType>
28 typedef typename MatrixType::Scalar
Scalar;
29 typedef typename MatrixType::Index
Index;
43 MatrixType
compute(
const MatrixType&
A);
52 bool taylorConverged(Index s,
const MatrixType& F,
const MatrixType& Fincr,
const MatrixType& P);
70 template <
typename MatrixType>
94 template <
typename MatrixType>
99 N.template triangularView<Upper>().solveInPlace(e);
100 m_mu = e.cwiseAbs().maxCoeff();
104 template <
typename MatrixType>
106 const MatrixType& Fincr,
const MatrixType& P)
108 const Index n = F.rows();
109 const RealScalar F_norm = F.cwiseAbs().rowwise().sum().maxCoeff();
110 const RealScalar Fincr_norm = Fincr.cwiseAbs().rowwise().sum().maxCoeff();
114 for (
Index r = 0; r < n; r++) {
116 for (
Index i = 0; i < n; i++)
120 delta = (std::max)(delta, mx / rfactorial);
122 const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
131 #endif // EIGEN_MATRIX_FUNCTION_ATOMIC
Scalar m_avgEival
Mean of eigenvalues.
StemFunction * m_f
Pointer to scalar function.
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Matrix< Scalar, MatrixType::RowsAtCompileTime, 1 > VectorType
internal::stem_function< Scalar >::type StemFunction
MatrixFunctionAtomic(StemFunction f)
Constructor.
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
MatrixType compute(const MatrixType &A)
Compute matrix function of atomic matrix.
MatrixFunctionAtomic & operator=(const MatrixFunctionAtomic &)
MatrixType::Scalar Scalar
NumTraits< Scalar >::Real RealScalar
MatrixType m_Ashifted
Argument shifted by mean of eigenvalues.
Index m_Arows
Size of matrix function.
Helper class for computing matrix functions of atomic matrices.
RealScalar m_mu
Constant used to determine whether Taylor series has converged.
void computeMu()
Compute m_mu.
The matrix class, also used for vectors and row-vectors.
bool taylorConverged(Index s, const MatrixType &F, const MatrixType &Fincr, const MatrixType &P)
Determine whether Taylor series has converged.