eoNDSorting< EOT > Class Template Reference

-*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- More...

#include <eoNDSorting.h>

Inheritance diagram for eoNDSorting< EOT >:

eoPerf2WorthCached< EOT, WorthT > eoPerf2Worth< EOT, WorthT > eoUF< A1, R > eoValueParam< std::vector< WorthT > > eoFunctorBase eoParam eoNDSorting_I< EOT > eoNDSorting_II< EOT >

List of all members.

Public Member Functions

 eoNDSorting (bool nasty_flag_=false)
virtual std::vector< double > niche_penalty (const std::vector< unsigned > &current_front, const eoPop< EOT > &_pop)=0
 Pure virtual function that calculates the 'distance' for each element in the current front Implement to create your own nondominated sorting algorithm.
void calculate_worths (const eoPop< EOT > &_pop)
 The actual virtual function the derived classes should implement.

Public Attributes

bool nasty_declone_flag_that_only_is_implemented_for_two_objectives

Private Member Functions

void one_objective (const eoPop< EOT > &_pop)
void two_objectives (const eoPop< EOT > &_pop)
 Optimization for two objectives.
void m_objectives (const eoPop< EOT > &_pop)
void rank_to_worth ()

Classes

class  DummyEO
 used in fast nondominated sorting DummyEO is just a storage place for fitnesses and to store the original index More...
class  Sorter


Detailed Description

template<class EOT>
class eoNDSorting< EOT >

-*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-

----------------------------------------------------------------------------- eoNDSorting.h (c) Maarten Keijzer, Marc Schoenauer, 2001

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mkeijzer@dhi.dk Non dominated sorting, it *is a* std::vector of doubles, the integer part is the rank (to which front it belongs), the fractional part the niching penalty or distance penalty or whatever penalty you want to squeeze into the bits.

Definition at line 42 of file eoNDSorting.h.


Member Function Documentation

template<class EOT>
virtual std::vector<double> eoNDSorting< EOT >::niche_penalty ( const std::vector< unsigned > &  current_front,
const eoPop< EOT > &  _pop 
) [pure virtual]

Pure virtual function that calculates the 'distance' for each element in the current front Implement to create your own nondominated sorting algorithm.

The size of the returned std::vector should be equal to the size of the current_front.

Implemented in eoNDSorting_I< EOT >, and eoNDSorting_II< EOT >.

Referenced by eoNDSorting< Dummy >::two_objectives().

template<class EOT>
void eoNDSorting< EOT >::two_objectives ( const eoPop< EOT > &  _pop  )  [inline, private]

Optimization for two objectives.

Makes the algorithm run in complexity O(n log n) where n is the population size

This is the same complexity as for a single objective or truncation selection or sorting.

It will perform a sort on the two objectives seperately, and from the information on the ranks of the individuals on these two objectives, the non-dominated sorting rank is determined. There are then three nlogn operations in place: one sort per objective, plus a binary search procedure to combine the information about the ranks.

After that it is a simple exercise to calculate the distance penalty

Definition at line 140 of file eoNDSorting.h.

Referenced by eoNDSorting< Dummy >::calculate_worths().


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

Generated on Thu Jan 1 23:19:48 2009 for EvolvingObjects by  doxygen 1.5.5