26 template <
typename Scalar,
typename ArnoldiOpType>
64 std::stringstream
msg;
65 msg <<
"Lanczos: from_k (= " << from_k <<
") is larger than the current subspace dimension (= " <<
m_k <<
")";
66 throw std::invalid_argument(msg.str());
79 for (Index
i = from_k;
i <= to_m - 1;
i++)
100 m_op.perform_op(v.data(), w.
data());
118 const Index i1 =
i + 1;
121 Scalar ortho_err = Vf.head(i1).cwiseAbs().maxCoeff();
131 if (m_beta < beta_thresh)
139 m_fac_f.noalias() -= Vs * Vf.head(i1);
148 ortho_err = Vf.head(i1).cwiseAbs().maxCoeff();
Eigen::Map< const Vector > MapConstVec
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
void expand_basis(MapConstMat &V, const Index seed, Vector &f, Scalar &fnorm)
A matrix or vector expression mapping an existing array of data.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Eigen::Map< Vector > MapVec
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
void compress_H(const TridiagQR< Scalar > &decomp)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
void matrix_QtHQ(Matrix &dest) const
Eigen::Map< Matrix > MapMat
Eigen::Map< const Matrix > MapConstMat
Lanczos(const ArnoldiOpType &op, Index m)
void factorize_from(Index from_k, Index to_m, Index &op_counter)