shark::MaxIterations< ResultSet > Class Template Reference

This stopping criterion stops after a fixed number of iterations. More...

#include <shark/Algorithms/StoppingCriteria/MaxIterations.h>

+ Inheritance diagram for shark::MaxIterations< ResultSet >:

Public Member Functions

 MaxIterations (unsigned int maxIterations)
 
void setMaxIterations (unsigned int newIterations)
 
bool stop (const ResultSet &set)
 returns true if training should stop More...
 
void reset ()
 reset iteration counter More...
 

Protected Attributes

unsigned int m_iteration
 current number of iterations More...
 
unsigned int m_maxIterations
 maximum number of iteration allowed More...
 

Additional Inherited Members

- Public Types inherited from shark::AbstractStoppingCriterion< ResultSet >
typedef ResultSet ResultSet
 

Detailed Description

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
class shark::MaxIterations< ResultSet >

This stopping criterion stops after a fixed number of iterations.

Definition at line 43 of file MaxIterations.h.

Constructor & Destructor Documentation

◆ MaxIterations()

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
shark::MaxIterations< ResultSet >::MaxIterations ( unsigned int  maxIterations)
inline

constructs the MaxIterations stopping criterion

Parameters
maxIterationsmaximum iterations before training should stop

Definition at line 47 of file MaxIterations.h.

References shark::MaxIterations< ResultSet >::m_iteration, and shark::MaxIterations< ResultSet >::m_maxIterations.

Member Function Documentation

◆ reset()

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
void shark::MaxIterations< ResultSet >::reset ( )
inlinevirtual

reset iteration counter

Implements shark::AbstractStoppingCriterion< ResultSet >.

Definition at line 61 of file MaxIterations.h.

References shark::MaxIterations< ResultSet >::m_iteration.

◆ setMaxIterations()

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
void shark::MaxIterations< ResultSet >::setMaxIterations ( unsigned int  newIterations)
inline

Definition at line 52 of file MaxIterations.h.

References shark::MaxIterations< ResultSet >::m_maxIterations.

Referenced by main().

◆ stop()

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
bool shark::MaxIterations< ResultSet >::stop ( const ResultSet set)
inlinevirtual

Member Data Documentation

◆ m_iteration

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
unsigned int shark::MaxIterations< ResultSet >::m_iteration
protected

◆ m_maxIterations

template<class ResultSet = SingleObjectiveResultSet<RealVector>>
unsigned int shark::MaxIterations< ResultSet >::m_maxIterations
protected

The documentation for this class was generated from the following file: