Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SelectionMatrix Class Reference

Matrix for calculating the selection probabilities of specific parent pairs. More...

#include <selection.h>

List of all members.

Public Methods

 SelectionMatrix (const SelectionSituation &situation)
void selectRandomPair (int &a, int &b) const
TextOStream & operator>> (TextOStream &out) const

Protected Methods

void calculateMatrix (const SelectionSituation &situation)


Detailed Description

Matrix for calculating the selection probabilities of specific parent pairs.

Yes, the selection mechanism acts on parent PAIRS; it doesn't just select one parent and then another parent and then mate them. This mechanism allows individuals themselves to affect their selection. It is also easy to incorporate various other factors such as distance in some environment-space as a selection probability factor between two individuals.

Definition at line 36 of file selection.h.


Constructor & Destructor Documentation

SelectionMatrix const SelectionSituation   situation [explicit]
 

Standard constructor.

* * Copyright (C) 1997-2002 Marko Grönroos <magi@iki.fi> * *

* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *

  • Suite 330, Boston, MA 02111-1307, USA. * *

Definition at line 33 of file selection.cc.

References calculateMatrix().


Member Function Documentation

void calculateMatrix const SelectionSituation   situation [protected]
 

Calculates the selection matrix.

Definition at line 37 of file selection.cc.

References SelectionSituation::getOrdered(), SelectionSituation::population(), Selector::select(), Individual::selector(), and SimplePopulation::size().

Referenced by SelectionMatrix().

TextOStream& operator>> TextOStream &    out const [inline]
 

Implementation for Object.

Definition at line 54 of file selection.h.

void selectRandomPair int &    a,
int &    b
const
 

Selects a random pair of individuals from the population.

These individuals will be mated.

Parameters:
a  Ordered (!) population index number of the first, selecting parent.
b  Ordered (!) population index number of the first, selecting parent.

Definition at line 70 of file selection.cc.

Referenced by EAStrategy::recombine().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:12:01 2005 for NeHeP by doxygen1.2.18