25 #ifndef PAGMO_ALGORITHM_BASE_H
26 #define PAGMO_ALGORITHM_BASE_H
31 #include <boost/shared_ptr.hpp>
33 #include "../config.h"
34 #include "../population.h"
36 #include "../serialization.h"
50 typedef boost::shared_ptr<base>
base_ptr;
102 virtual base_ptr clone()
const = 0;
104 std::string human_readable()
const;
105 virtual std::string get_name()
const;
106 virtual std::string human_readable_extra()
const;
108 void set_screen_output(
const bool p);
109 bool get_screen_output()
const;
112 void reset_rngs(
const unsigned int)
const;
122 friend class boost::serialization::access;
123 template <
class Archive>
124 void serialize(Archive &ar,
const unsigned int)
128 ar & m_screen_output;
135 std::ostream __PAGMO_VISIBLE_FUNC &
operator<<(std::ostream &,
const base &);
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base algorithm.
This rng returns an unsigned integer in the [0,2**32-1] range.
bool m_screen_output
Indicates to the derived class whether to print stuff on screen.
unsigned int m_fevals
A counter for the number of function evaluations.
rng_uint32 m_urng
Random number generator for unsigned integer values.
std::ostream & operator<<(std::ostream &s, const base &alg)
Overload stream operator for algorithm::base.
rng_double m_drng
Random number generator for double-precision floating point values.
This rng returns a double in the [0,1[ range.