5 template <
typename Scalar>
15 Index i, j, k, l, ii, jj;
20 const Index n = r.
cols();
21 const Scalar tolr = tol *
abs(r(0,0));
27 for (k = 0; k < n; ++k)
28 if (
abs(r(k,k)) > tolr) {
30 for (j = 0; j <= k-1; ++j) {
31 temp = r(k,k) * r(j,k);
33 r.col(k).head(j+1) -= r.col(j).head(j+1) * temp;
40 for (k = 0; k <= l; ++k) {
41 for (j = 0; j <= k-1; ++j)
42 r.col(j).head(j+1) += r.col(k).head(j+1) * r(j,k);
43 r.col(k).head(k+1) *= r(k,k);
48 for (j = 0; j < n; ++j) {
51 for (i = 0; i <= j; ++i) {
64 r.topLeftCorner(n,n).template triangularView<StrictlyUpper>() = r.topLeftCorner(n,n).transpose();
IntermediateState sqrt(const Expression &arg)
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
void covar(Matrix< Scalar, Dynamic, Dynamic > &r, const VectorXi &ipvt, Scalar tol=std::sqrt(NumTraits< Scalar >::epsilon()))
EIGEN_STRONG_INLINE Index cols() const