Back to Top page.

EGTCrossover< TP > Class Template Reference

Base class template for crossover operations. More...

#include <EGTCrossover.h>

List of all members.

Public Types

typedef TP Pop
typedef Pop::Graph Graph
typedef EGTVector< const Graph * > Graphs
typedef Graph::SubGraph SubGraph

Public Methods

virtual ~EGTCrossover ()
 Destructor.

virtual UInt Crossover (const Graphs &src, Pop &dest)
 Performs crossover operations to the Population.


Protected Methods

virtual bool DoCrossover (const Graph &graph1, const Graph &graph2, Pop &dest)
 Performs a crossover operation to two Graphs.


Detailed Description

template<class TP>
class EGTCrossover< TP >

Base class template for crossover operations.

A crossover operation recombines two parent graphs into new graphs by exchanging their compatible SubGraphs.
It is assumed that <TP> is a subclass of EGTPopulation.


Member Typedef Documentation

template<class TP>
typedef Pop::Graph EGTCrossover< TP >::Graph
 

template<class TP>
typedef EGTVector<const Graph*> EGTCrossover< TP >::Graphs
 

template<class TP>
typedef TP EGTCrossover< TP >::Pop
 

template<class TP>
typedef Graph::SubGraph EGTCrossover< TP >::SubGraph
 


Constructor & Destructor Documentation

template<class TP>
virtual EGTCrossover< TP >::~EGTCrossover   [inline, virtual]
 

Destructor.


Member Function Documentation

template<class TP>
UInt EGTCrossover< TP >::Crossover const Graphs   src,
Pop   dest
[virtual]
 

Performs crossover operations to the Population.

Parameters:
src  [in] Array of Graphs to be manipulated by crossover operations
dest  [out] Population of the next generation
Returns:
Number of successful crossover operations

template<class TP>
bool EGTCrossover< TP >::DoCrossover const Graph   graph1,
const Graph   graph2,
Pop   dest
[protected, virtual]
 

Performs a crossover operation to two Graphs.

Parameters:
graph1  [in] Graph 1 to be manipulated by the crossover operation
graph2  [in] Graph 2 to be manipulated by the crossover operation
dest  [out] Population of the next generation
Return values:
true  The crossover operation succeeded.
false  The crossover operation failed.


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