56 #include "../../../../Eigen/src/Core/util/NonMPL2.h" 58 #ifndef EIGEN_ITERATION_CONTROLLER_H 59 #define EIGEN_ITERATION_CONTROLLER_H 87 m_nit = 0; m_res = 0.0; m_written =
false;
88 m_resminreach = 1E50; m_resadd = 0.0;
93 : m_rhsn(1.0), m_maxiter(mit), m_noise(noi), m_resmax(r) {
init(); }
98 bool first() {
return m_nit == 0; }
130 m_resminreach = (std::min)(m_resminreach, m_res);
133 template<
typename VectorType>
bool converged(
const VectorType &
v)
139 if (m_noise > 0 && !m_written)
144 return (m_nit >= m_maxiter ||
converged(nr));
146 template <
typename VectorType>
154 #endif // EIGEN_ITERATION_CONTROLLER_H double m_rhsn
Right hand side norm.
bool finished(const MatrixBase< VectorType > &v)
void setMaxIterations(size_t i)
double maxResidual() const
iterative scaling algorithm to equilibrate rows and column norms in matrices
void setCallback(void(*t)(const IterationController &))
double m_resmax
maximum residual
void setRhsNorm(double r)
size_t m_maxiter
Max. number of iterations.
void setMaxResidual(double r)
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
bool converged(const VectorType &v)
size_t maxIterarions() const
int m_noise
if noise > 0 iterations are printed
size_t m_nit
iteration number
RealScalar squaredNorm() const
bool converged(double nr)
void(* m_callback)(const IterationController &)
IterationController(double r=1.0E-8, int noi=0, size_t mit=size_t(-1))
void setNoiseLevel(int n)
Controls the iterations of the iterative solvers.
Base class for all dense matrices, vectors, and expressions.
double m_res
last computed residual
void setIteration(size_t i)