File stopping_criterion_time.hpp¶
-
class ITimeStoppingCriterionConfig¶
- #include <stopping_criterion_time.hpp>
Defines an interface for all classes that allow to configure a stopping criterion that ensures that a certain time limit is not exceeded.
Subclassed by TimeStoppingCriterionConfig
Public Functions
-
inline virtual ~ITimeStoppingCriterionConfig()¶
-
virtual ITimeStoppingCriterionConfig &setTimeLimit(uint32 timeLimit) = 0¶
Sets the time limit.
- Parameters:
timeLimit – The time limit in seconds. Must be at least 1
- Returns:
A reference to an object of type
ITimeStoppingCriterionConfig
that allows further configuration of the stopping criterion
-
inline virtual ~ITimeStoppingCriterionConfig()¶
-
class TimeStoppingCriterionConfig : public IStoppingCriterionConfig, public ITimeStoppingCriterionConfig¶
- #include <stopping_criterion_time.hpp>
Allows to configure a stopping criterion that ensures that a certain time limit is not exceeded.
Public Functions
-
TimeStoppingCriterionConfig()¶
-
virtual uint32 getTimeLimit() const override¶
Returns the time limit.
- Returns:
The time limit in seconds
-
virtual ITimeStoppingCriterionConfig &setTimeLimit(uint32 timeLimit) override¶
Sets the time limit.
- Parameters:
timeLimit – The time limit in seconds. Must be at least 1
- Returns:
A reference to an object of type
ITimeStoppingCriterionConfig
that allows further configuration of the stopping criterion
-
virtual std::unique_ptr<IStoppingCriterionFactory> createStoppingCriterionFactory() const override¶
Creates and returns a new object of type
IStoppingCriterionFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
IStoppingCriterionFactory
that has been created
-
TimeStoppingCriterionConfig()¶