Differential Evolution C++ library
de::mutation_strategy::Urn Class Reference

#include <mutation_strategy.hpp>

List of all members.

Public Member Functions

 Urn (size_t NP, size_t avoid)
size_t operator[] (size_t index) const

Detailed Description

Used to generate a set of 4 random size_t numbers by the mutation strategy as indexes

The numbers must all be different, and also different from an index supplied externally

Author:
adrian (12/1/2011)

Constructor & Destructor Documentation

de::mutation_strategy::Urn::Urn ( size_t  NP,
size_t  avoid 
) [inline]

Constructs an urn object

Author:
adrian (12/4/2011)
Parameters:
NPupper limit (exclusive) for the generated random numbers
avoidvalue to avoid when generating the random numbers

Member Function Documentation

size_t de::mutation_strategy::Urn::operator[] ( size_t  index) const [inline]

returns one of the four generated random numbers

Author:
adrian (12/4/2011)
Parameters:
indexthe index of the random number to return, can be between 0-3
Returns:
size_t

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