Modernized GAlib
3.0.0 current
|
Public Member Functions | |
GADefineIdentity ("GATreeGenome", GAID::TreeGenome) | |
GATreeGenome (GAGenome::Evaluator f=nullptr, void *u=nullptr) | |
GATreeGenome (const GATreeGenome< T > &orig) | |
GATreeGenome< T > & | operator= (const GAGenome &orig) |
GAGenome * | clone (GAGenome::CloneMethod flag=CloneMethod::CONTENTS) const override |
void | copy (const GAGenome &orig) override |
void | _tt (std::ostream &os, GANode< T > *n) |
int | write (std::ostream &os) const override |
bool | equal (const GAGenome &c) const override |
int | destroy () |
int | swaptree (GATree< T > *t) |
int | swaptree (unsigned int i, unsigned int j) |
int | swap (unsigned int i, unsigned int j) |
GATree< T > * | remove () |
int | insert (GATree< T > *t, GATreeBASE::Location where=GATreeBASE::BELOW) |
int | insert (const T &t, GATreeBASE::Location where=GATreeBASE::BELOW) |
![]() | |
GATree (const T &t) | |
GATree (const GATree< T > &orig) | |
GATree< T > & | operator= (const GATree< T > &orig) |
GATree< T > * | clone (unsigned int i=0) const |
void | copy (const GATree< T > &orig) |
int | destroy () |
int | swaptree (GATree< T > *t) |
int | swaptree (unsigned int a, unsigned int b) |
int | swap (unsigned int a, unsigned int b) |
GATree< T > * | remove () |
int | insert (GATree< T > *t, GATreeBASE::Location where=GATreeBASE::BELOW) |
int | insert (const T &t, GATreeBASE::Location where=GATreeBASE::BELOW) |
T * | root () |
T * | current () |
T * | next () |
T * | prev () |
T * | parent () |
T * | child () |
T * | eldest () |
T * | youngest () |
T * | warp (unsigned int i) |
T * | warp (const GATreeIter< T > &i) |
int | nchildren () |
int | nsiblings () |
![]() | |
GATreeBASE (GANodeBASE *n) | |
GANodeBASE * | remove (GANodeBASE *n) |
int | insert (GANodeBASE *n, GANodeBASE *idx, Location where=BELOW) |
int | swaptree (GANodeBASE *a, GANodeBASE *b) |
int | swapnode (GANodeBASE *a, GANodeBASE *b) |
int | size () const |
int | depth () const |
int | ancestral (unsigned int i, unsigned int j) const |
![]() | |
GADefineIdentity ("GAGenome", GAID::Genome) | |
GAGenome (Initializer i=nullptr, Mutator m=nullptr, Comparator c=nullptr) | |
GAGenome (const GAGenome &orig) | |
GAGenome & | operator= (const GAGenome &arg) |
virtual int | read (std::istream &) |
virtual bool | notequal (const GAGenome &g) const |
int | nevals () const |
float | score () const |
float | score (float s) |
float | fitness () |
float | fitness (float f) |
GAGeneticAlgorithm * | geneticAlgorithm () const |
GAGeneticAlgorithm * | geneticAlgorithm (GAGeneticAlgorithm &g) |
void * | userData () const |
void * | userData (void *u) |
GAEvalData * | evalData () const |
GAEvalData * | evalData (const GAEvalData &o) |
float | evaluate (bool flag=false) const |
Evaluator | evaluator () const |
Evaluator | evaluator (Evaluator f) |
void | initialize () |
Initializer | initializer () const |
Initializer | initializer (Initializer op) |
int | mutate (float p) |
Mutator | mutator () const |
Mutator | mutator (Mutator op) |
float | compare (const GAGenome &g) const |
Comparator | comparator () const |
Comparator | comparator (Comparator c) |
SexualCrossover | crossover (SexualCrossover f) |
SexualCrossover | sexual () const |
AsexualCrossover | crossover (AsexualCrossover f) |
AsexualCrossover | asexual () const |
![]() | |
bool | sameClass (const GAID &b) const |
virtual const char * | className () const |
virtual int | classID () const |
Static Public Member Functions | |
static int | DestructiveMutator (GAGenome &c, float pmut) |
static int | SwapNodeMutator (GAGenome &c, float pmut) |
static int | SwapSubtreeMutator (GAGenome &c, float pmut) |
static int | OnePointCrossover (const GAGenome &p1, const GAGenome &p2, GAGenome *c1, GAGenome *c2) |
static float | TopologyComparator (const GAGenome &a, const GAGenome &b) |
![]() | |
static void | NoInitializer (GAGenome &) |
static int | NoMutator (GAGenome &, float) |
static float | NoComparator (const GAGenome &, const GAGenome &) |
Additional Inherited Members | |
![]() | |
enum | Location { ROOT = 0 , BEFORE , AFTER , BELOW } |
enum | { NO_ERR = 0 , ERR = -1 } |
![]() | |
enum class | Dimension { LENGTH = 0 , WIDTH = 0 , HEIGHT = 1 , DEPTH = 2 } |
enum class | CloneMethod { CONTENTS = 0 , ATTRIBUTES = 1 } |
enum | { FIXED_SIZE = -1 , ANY_SIZE = -10 } |
using | Evaluator = float(*)(GAGenome &) |
using | Initializer = void(*)(GAGenome &) |
using | Mutator = int(*)(GAGenome &, float) |
using | Comparator = float(*)(const GAGenome &, const GAGenome &) |
using | SexualCrossover = int(*)(const GAGenome &, const GAGenome &, GAGenome *, GAGenome *) |
using | AsexualCrossover = int(*)(const GAGenome &, GAGenome *) |
![]() | |
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 } |
![]() | |
int | insert (GANode< T > *n, GANode< T > *idx, GATreeBASE::Location where=GATreeBASE::BELOW) |
![]() | |
GATreeIter< T > | iter |
![]() | |
int | sz |
int | dpth |
short | csz |
short | cdpth |
GANodeBASE * | rt |
![]() | |
float | _score |
float | _fitness |
bool | _evaluated |
unsigned int | _neval |
GAGeneticAlgorithm * | ga |
void * | ud |
Evaluator | eval |
GAEvalData * | evd |
Mutator | mutr |
Initializer | init |
Comparator | cmp |
SexualCrossover | sexcross |
AsexualCrossover | asexcross |