Modernized GAlib  3.0.0 current
Public Types | Public Member Functions | List of all members
GAID Class Reference

This defines the identifiers for polymorphic classes. More...

#include <gaid.h>

Inheritance diagram for GAID:
[legend]

Public Types

enum  {
  BaseGA = 0 , SimpleGA , SteadyStateGA , IncrementalGA ,
  DemeGA , Population = 10 , Scaling = 15 , NoScaling ,
  LinearScaling , SigmaTruncationScaling , PowerLawScaling , Sharing ,
  Selection = 40 , RankSelection , RouletteWheelSelection , TournamentSelection ,
  UniformSelection , SRSSelection , DSSelection , Genome = 50 ,
  BinaryStringGenome , BinaryStringGenome2D , BinaryStringGenome3D , Bin2DecGenome ,
  ListGenome , TreeGenome , ArrayGenome , ArrayGenome2D ,
  ArrayGenome3D , ArrayAlleleGenome , ArrayAlleleGenome2D , ArrayAlleleGenome3D ,
  StringGenome , FloatGenome , IntGenome , DoubleGenome
}
 

Public Member Functions

bool sameClass (const GAID &b) const
 
virtual const char * className () const
 
virtual int classID () const
 

Detailed Description

This defines the identifiers for polymorphic classes.

The IDs are used primarily for checking to be see if the two objects are the same type before doing a copy, for example. The name is often used when printing out error messages so you'll know where things are happening. I hate to derive so many classes from the same base class, especially when the derived classes are completely unrelated. But this is a convenient way to enumerate the built-in classes, and they DO share the polymorphic behaviour (even if they do NOT share any other attributes).


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