HGA Instance. More...
#include <rinsth.h>
Public Member Functions | |
RInstH (size_t popsize, RCursor< cObj > objs, const RString &h, const RString &name, RDebug *debug=0) | |
virtual RCString | GetClassName (void) const |
virtual void | Init (void) |
RString | GetHeuristic (void) const |
size_t | GetMaxAttr (void) const |
RTreeHeuristic< cNode, cObj, cChromo > * | GetHeuristic (size_t thread) |
virtual RTreeHeuristic< cNode, cObj, cChromo > * | CreateHeuristic (void) |
virtual void | PostRun (void) |
virtual void | DisplayInfos (void) |
virtual | ~RInstH (void) |
Public Member Functions inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
RInst (size_t popsize, const RString &name, RDebug *debug=0) | |
void | SetMutationParams (size_t agemut, size_t agebestmut, size_t nbmut) |
void | SetVerify (bool verify) |
bool | GetVerify (void) const |
bool | MustOptimisation (void) const |
void | SetOptimisation (bool opti) |
cChromo * | GetBestChromosome (void) const |
void | SetSeed (int seed) |
int | GetSeed (void) const |
virtual void | AnalyzePop (void) |
virtual void | PostEvaluate (void) |
virtual void | RandomConstruct (void) |
virtual bool | StopCondition (void)=0 |
virtual void | Crossover (void) |
virtual void | Mutation (void) |
virtual void | StrongMutation (void) |
virtual void | Inversion (void) |
void | Generation (void) |
virtual void | Run (void) |
virtual void | Verify (void) |
virtual void | HandlerNotFound (const RNotification ¬ification) |
long | RRand (long max) |
template<class T > | |
void | RandOrder (T *array, size_t size) |
virtual | ~RInst (void) |
Public Member Functions inherited from RObject | |
RObject (const RString &name=RString::Null) | |
int | Compare (const RObject &obj) const |
RString | GetName (void) const |
void | PostNotification (const hNotification handle) |
void | PostNotification (const RCString &name) |
void | PostNotification (const hNotification handle, T data) |
void | PostNotification (const RCString &name, T data) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const RCString &name, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle) |
void | InsertObserver (tNotificationHandler handler, const RCString &name) |
void | InsertObserver (tNotificationHandler handler, RObject *object) |
void | InsertObserver (tNotificationHandler handler) |
void | DeleteObserver (void) |
void | DeleteObserver (const hNotification handle, RObject *object) |
void | DeleteObserver (const RCString &name, RObject *object) |
hNotification | GetNotificationHandle (const RCString &name) const |
RCString | GetNotificationName (const hNotification handle) const |
virtual | ~RObject (void) |
Public Member Functions inherited from iRInst | |
size_t | GetPopSize (void) const |
size_t | GetGen (void) const |
size_t | GetAgeBest (void) const |
size_t | GetAgeBestPop (void) const |
virtual | ~iRInst (void) |
Protected Attributes | |
RString | Heuristic |
RCursor< cObj > | Objs |
size_t | MaxAttr |
size_t | ControlAttr |
size_t | MaxNodes |
Protected Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
cThreadData ** | thDatas |
bool | bRandomConstruct |
bool | VerifyGA |
bool | DoPostEvaluation |
bool | DoOptimisation |
Protected Attributes inherited from RObject | |
RString | Name |
Protected Attributes inherited from iRInst | |
size_t | PopSize |
size_t | Gen |
size_t | AgeBest |
size_t | AgeBestPop |
bool | Pause |
Additional Inherited Members | |
Static Public Member Functions inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
static int | sort_function_cChromosome (const void *a, const void *b) |
Public Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
RDebug * | Debug |
RRandom | Random |
cChromo ** | Chromosomes |
cChromo ** | Ranked |
cChromo * | BestChromosome |
cChromo * | BestInPop |
Static Public Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
static const char | instMaster =0 |
static const char | instSlave =1 |
static const char | instMultiProcess =2 |
static const char | instMultiComputers =4 |
static const char | instMultiEchos =8 |
Protected Member Functions inherited from iRInst | |
iRInst (size_t popsize) | |
Detailed Description
template<class cInst, class cChromo, class cFit, class cThreadData, class cNode, class cObj>
class R::RInstH< cInst, cChromo, cFit, cThreadData, cNode, cObj >
HGA Instance.
The RInstH class proposes a generic instance for a Hierarchical Genetic Algorithm (HGA).
Constructor & Destructor Documentation
RInstH | ( | size_t | popsize, |
RCursor< cObj > | objs, | ||
const RString & | h, | ||
const RString & | name, | ||
RDebug * | debug = 0 |
||
) |
Construct the instance.
- Parameters
-
popsize Size of the population. objs Objects to place in the tree. h The heuristic that has to be used. name Name of the genetic algorithm. debug Debugger.
|
virtual |
Destruct the instance.
Member Function Documentation
|
virtual |
Return the name of the class.
Reimplemented from RInst< cInst, cChromo, cFit, cThreadData >.
|
virtual |
Initialization of the instance.
Reimplemented from RInst< cInst, cChromo, cFit, cThreadData >.
RString GetHeuristic | ( | void | ) | const |
Return the heuristic type.
size_t GetMaxAttr | ( | void | ) | const |
Get the maximum number of attributes associated to an object.
RTreeHeuristic<cNode,cObj,cChromo>* GetHeuristic | ( | size_t | thread | ) |
Get the heuristic of a given thread.
- Parameters
-
thread Number of the thread.
|
virtual |
Create a heuristic object.
|
virtual |
This function do a traitement after the GA stops.
Reimplemented from RInst< cInst, cChromo, cFit, cThreadData >.
|
virtual |
Display information about the current population.
Reimplemented from RInst< cInst, cChromo, cFit, cThreadData >.
Member Data Documentation
|
protected |
Type of the heuristic that used.
|
protected |
Objects to group.
|
protected |
Maximum number of attributes for an object.
|
protected |
Highest identifier of an attribute.
|
protected |
Maximum number of nodes to allocate by default.