PopulationT< T > Class Template Reference

Population with uniform chromosome type ChromosomeT < T >. More...

#include <PopulationT.h>

Inheritance diagram for PopulationT< T >:

PopulationCT< ChromosomeT< T > > Population

List of all members.

Public Member Functions

 PopulationT ()
 PopulationT (unsigned n)
 PopulationT (unsigned n, unsigned m)
 create a population of n individuals with m chromosomes each
 PopulationT (const IndividualT< T > &ind)
 PopulationT (unsigned n, const IndividualT< T > &ind)
 PopulationT (unsigned n, const ChromosomeT< T > &c0)
 PopulationT (unsigned n, const ChromosomeT< T > &c0, const ChromosomeT< T > &c1)
 PopulationT (unsigned n, const ChromosomeT< T > &c0, const ChromosomeT< T > &c1, const ChromosomeT< T > &c2)
 PopulationT (unsigned n, const std::vector< ChromosomeT< T > * > &v)
 PopulationT (const PopulationT< T > &pop)
 PopulationT (const std::vector< IndividualT< T > * > &v)
 ~PopulationT ()
IndividualT< T > & operator[] (unsigned i)
const IndividualT< T > & operator[] (unsigned i) const
PopulationT< T > operator() (unsigned from, unsigned to) const
PopulationT< T > & operator= (const IndividualT< T > &ind)
PopulationT< T > & operator= (const PopulationT< T > &pop)
IndividualT< T > & oneOfBest ()
const IndividualT< T > & oneOfBest () const
IndividualT< T > & best ()
const IndividualT< T > & best () const
IndividualT< T > & worst ()
const IndividualT< T > & worst () const
IndividualT< T > & random ()
const IndividualT< T > & random () const
IndividualT< T > & selectOneIndividual ()


Detailed Description

template<typename T>
class PopulationT< T >

Population with uniform chromosome type ChromosomeT < T >.
Examples:

countingOnes.cpp, sphereGA.cpp, steadyState.cpp, and TSP_GA.cpp.

Definition at line 202 of file PopulationT.h.


Constructor & Destructor Documentation

template<typename T >
PopulationT< T >::PopulationT (  )  [inline]

Definition at line 207 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n  )  [inline, explicit]

Definition at line 210 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
unsigned  m 
) [inline]

create a population of n individuals with m chromosomes each

Definition at line 218 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( const IndividualT< T > &  ind  )  [inline]

Definition at line 223 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
const IndividualT< T > &  ind 
) [inline]

Definition at line 228 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
const ChromosomeT< T > &  c0 
) [inline]

Definition at line 234 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
const ChromosomeT< T > &  c0,
const ChromosomeT< T > &  c1 
) [inline]

Definition at line 240 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
const ChromosomeT< T > &  c0,
const ChromosomeT< T > &  c1,
const ChromosomeT< T > &  c2 
) [inline]

Definition at line 247 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( unsigned  n,
const std::vector< ChromosomeT< T > * > &  v 
) [inline]

Definition at line 254 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( const PopulationT< T > &  pop  )  [inline]

Definition at line 260 of file PopulationT.h.

template<typename T >
PopulationT< T >::PopulationT ( const std::vector< IndividualT< T > * > &  v  )  [inline]

Definition at line 268 of file PopulationT.h.

template<typename T >
PopulationT< T >::~PopulationT (  )  [inline]

Definition at line 276 of file PopulationT.h.


Member Function Documentation

template<typename T >
const IndividualT< T >& PopulationT< T >::best (  )  const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 322 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::best (  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 318 of file PopulationT.h.

template<typename T >
const IndividualT< T >& PopulationT< T >::oneOfBest (  )  const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 313 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::oneOfBest (  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 308 of file PopulationT.h.

template<typename T >
PopulationT< T > PopulationT< T >::operator() ( unsigned  from,
unsigned  to 
) const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 289 of file PopulationT.h.

template<typename T >
PopulationT< T >& PopulationT< T >::operator= ( const PopulationT< T > &  pop  )  [inline]

Definition at line 302 of file PopulationT.h.

template<typename T >
PopulationT< T >& PopulationT< T >::operator= ( const IndividualT< T > &  ind  )  [inline]

Definition at line 296 of file PopulationT.h.

template<typename T >
const IndividualT< T >& PopulationT< T >::operator[] ( unsigned  i  )  const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 284 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::operator[] ( unsigned  i  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 279 of file PopulationT.h.

template<typename T >
const IndividualT< T >& PopulationT< T >::random (  )  const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 340 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::random (  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 336 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::selectOneIndividual (  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 345 of file PopulationT.h.

template<typename T >
const IndividualT< T >& PopulationT< T >::worst (  )  const [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 331 of file PopulationT.h.

template<typename T >
IndividualT< T >& PopulationT< T >::worst (  )  [inline]

Reimplemented from PopulationCT< ChromosomeT< T > >.

Definition at line 327 of file PopulationT.h.


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