PaGMO  1.1.5
Data Structures | Public Member Functions | Static Protected Member Functions | Friends
pagmo::algorithm::base_gsl Class Reference

Base class for GSL algorithms. More...

#include <base_gsl.h>

Inheritance diagram for pagmo::algorithm::base_gsl:
Inheritance graph
[legend]

Data Structures

struct  objfun_wrapper_params
 Structure to feed parameters to the wrappers for the objective function and its derivative. More...
 

Public Member Functions

 base_gsl ()
 Default constructor. More...
 
- Public Member Functions inherited from pagmo::algorithm::base
 base ()
 Default constructor. More...
 
virtual void evolve (population &p) const =0
 Evolve method. More...
 
virtual base_ptr clone () const =0
 Clone method. More...
 
virtual ~base ()
 Trivial destructor. More...
 
std::string human_readable () const
 Return human readable representation of the algorithm. More...
 
virtual std::string get_name () const
 Get algorithm's name. More...
 
virtual std::string human_readable_extra () const
 Extra information in human readable format. More...
 
void set_screen_output (const bool p)
 Setter-Getter for protected m_screen_output data. More...
 
bool get_screen_output () const
 Gets screen output. More...
 
void reset_rngs (const unsigned int) const
 Resets the seed of the internal rngs using a user-provided seed. More...
 

Static Protected Member Functions

static double objfun_wrapper (const gsl_vector *, void *)
 Objective function wrapper. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from pagmo::algorithm::base
bool m_screen_output
 Indicates to the derived class whether to print stuff on screen.
 
rng_double m_drng
 Random number generator for double-precision floating point values.
 
rng_uint32 m_urng
 Random number generator for unsigned integer values.
 
unsigned int m_fevals
 A counter for the number of function evaluations.
 

Detailed Description

Base class for GSL algorithms.

All GSL algorithms should derive from this class, which will automatically setup the GSL environment for use in PaGMO, and will provide building blocks for wrapping the GSL minimisers.

Please note that GSL provides function minimisers, so that regardless of the comparison functions implemented in problem::base, all GSL algorithms will try to minimise the objective function.

Also, please note that this wrapper handles bounds constraints simply by flattening the out-of-bounds coordinates of the optimised decision vector towards the bounds.

This class of algorithms supports single-objective, unconstrained, continuous optimisation.

See also
http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html for an overview of the minimisers available in the GSL.
Author
Francesco Biscani (blues.nosp@m.carn.nosp@m.i@gma.nosp@m.il.c.nosp@m.om)

Definition at line 56 of file base_gsl.h.

Constructor & Destructor Documentation

pagmo::algorithm::base_gsl::base_gsl ( )

Default constructor.

Will make sure that the GSL environment is initialised properly.

Definition at line 53 of file base_gsl.cpp.

Member Function Documentation

double pagmo::algorithm::base_gsl::objfun_wrapper ( const gsl_vector *  v,
void *  params 
)
staticprotected

Objective function wrapper.

Parameters
[in]vpointer to the gsl_vector representing the decision vector.
[in]paramspointer to extra parameters for the internal function.
Returns
the fitness of the input decision vector.

Definition at line 67 of file base_gsl.cpp.


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