23 #include <cusp/detail/config.h>
100 template <
typename ValueType>
104 typedef typename cusp::norm_type<ValueType>::type Real;
117 template <
typename VectorType>
122 const bool verbose =
false);
184 template <
typename Vector>
208 template <
typename Vector>
209 void reset(
const Vector& b);
247 size_t iteration_limit_;
248 size_t iteration_count_;
249 Real relative_tolerance_;
250 Real absolute_tolerance_;
256 template <
typename ValueType>
265 typedef typename Parent::Real Real;
281 template <
typename VectorType>
290 template <
typename ValueType>
299 typedef typename Parent::Real Real;
315 template <
typename VectorType>
324 template <
typename ValueType>
333 typedef typename Parent::Real Real;
349 template <
typename VectorType>
360 #include <cusp/detail/monitor.inl>
CUSP_DEPRECATED default_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a default_monitor for a given right-hand-side b.
void set_verbose(bool verbose_=true)
Sets the verbosity level of the monitor.
Real absolute_tolerance(void) const
Returns the absolute tolerance.
size_t iteration_count(void) const
Returns the number of iterations that the monitor has executed.
Real geometric_rate(void)
Returns the geometric convergence rate.
Implements standard convergence criteria and reporting for iterative solvers.
CUSP_DEPRECATED verbose_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a verbose_monitor for a given right-hand-side b.
size_t iteration_limit(void) const
Returns the maximum number of iterations.
bool finished(const Vector &r)
Applies convergence criteria to determine whether iteration is finished.
Real tolerance(void) const
Return the tolerance equal to absolute_tolerance() + relative_tolerance() * ||b||.
void reset(const Vector &b)
Resets the monitor using same convergence criteria.
Real immediate_rate(void)
Returns the immedidate convergence rate.
bool converged(void) const
Indicates whether the last tested residual satisfies the convergence tolerance.
void print(void)
Prints the number of iterations and convergence history information.
bool is_verbose(void)
Gets the verbosity level of the monitor.
CUSP_DEPRECATED convergence_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a convergence_monitor for a given right-hand-side b.
Real relative_tolerance(void) const
Returns the relative tolerance.
void operator++(void)
Increments the iteration count.
monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0, const bool verbose=false)
Constructs a monitor for a given right-hand-side b.
Real residual_norm(void) const
Euclidean norm of last residual.
Real average_rate(void)
Returns the average convergence rate.