Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
The GenContext class. More...
#include <GenContext.h>
Public Member Functions | |
GenContext (GenPrototype *prototype) | |
constructor to create a GenContext. More... | |
virtual | ~GenContext () |
destructor to delete a GenContext. More... | |
GenPrototype * | getPrototype (void) const |
[inline], [const] More... | |
void | addGen (Gen *gen) |
[inline] This function add a Gen to the Context. More... | |
void | removeGen (Gen *gen) |
[inline] This function removes one gen which is saved inside the context (but NO deleting of the gen!!!). More... | |
const std::vector< Gen * > & | getGene (void) const |
[inline], [const] This function gives all gens which are saved in this context back. More... | |
void | update (double factor=1.5) |
This function makes an update on the statistical values. More... | |
![]() | |
Inspectable (const iparamkey &name="") | |
TYPEDEFS END. More... | |
virtual | ~Inspectable () |
virtual iparamkeylist | getInternalParamNames () const |
The list of the names of all internal parameters given by getInternalParams(). More... | |
virtual iparamvallist | getInternalParams () const |
virtual iparamvalptrlist | getInternalParamsPtr () const |
be careful: matrices will be ignored More... | |
virtual ilayerlist | getStructuralLayers () const |
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important. More... | |
virtual iconnectionlist | getStructuralConnections () const |
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important. More... | |
virtual void | addInspectableValue (const iparamkey &key, iparamval const *val, const std::string &descr=std::string()) |
This is the new style for adding inspectable values. More... | |
virtual void | addInspectableMatrix (const iparamkey &key, const matrix::Matrix *m, bool only4x4AndDiag=true, const std::string &descr=std::string()) |
This is the new style for adding inspectable values. More... | |
virtual void | addInspectableDescription (const iparamkey &key, const std::string &descr) |
adds a description for the given parameter using info-lines The line will start (appart from the #I) with a D for description followed by the key end then followed by the string. More... | |
virtual void | addInfoLine (std::string infoLine) |
Adds an info line to this inspectable instance. More... | |
virtual void | addInfoLines (std::list< std::string > infoLineList) |
Adds a bunch of infolines with addInfoLine to this inspectable instance. More... | |
virtual void | removeInfoLines () |
Removes all infolines from this inspectable instance. More... | |
virtual const infoLinesList & | getInfoLines () const |
Returns all infolines added to this inspectable instance. More... | |
virtual void | addInspectable (Inspectable *insp) |
Adds an inspectable as a child object. More... | |
virtual void | removeInspectable (Inspectable *insp) |
Removes an inspectable as a child object. More... | |
virtual void | setNameOfInspectable (const iparamkey &name) |
set the name of the inspectable More... | |
virtual const iparamkey | getNameOfInspectable () const |
return the name of the inspectable, getName() would conflict with Configurable::getName() too often More... | |
virtual const inspectableList & | getInspectables () const |
Returns the list containing all inspectable children. More... | |
Static Public Member Functions | |
static bool | restore () |
restore all GenContext More... | |
Protected Attributes | |
std::vector< Gen * > | m_storage |
(vector<Gen*> Storage for all Genes which are saved in this context. More... | |
GenPrototype * | m_prototype |
(GenPrototyp*) the prototype for which are the context is. More... | |
double | m_min |
the min value of the gens More... | |
double | m_w1 |
the under whisker of the gens More... | |
double | m_q1 |
the under quartil of the gens More... | |
double | m_med |
the median of the gens More... | |
double | m_avg |
the average of the gens More... | |
double | m_q3 |
the upper quartil of the gens More... | |
double | m_w3 |
the upper whisker of the gens More... | |
double | m_max |
the max value of the gens More... | |
![]() | |
iparamkey | name |
iparampairlist | mapOfValues |
imatrixpairlist | mapOfMatrices |
infoLinesList | infoLineStringList |
Additional Inherited Members | |
![]() | |
typedef std::string | iparamkey |
typedef double | iparamval |
typedef std::pair< iparamkey, iparamval const * > | iparampair |
typedef std::pair< iparamkey, std::pair< const matrix::Matrix *, bool > > | imatrixpair |
typedef std::list< iparamkey > | iparamkeylist |
typedef std::list< std::string > | infoLinesList |
typedef std::list< iparamval > | iparamvallist |
typedef std::list< iparamval const * > | iparamvalptrlist |
typedef std::list< iparampair > | iparampairlist |
typedef std::list< imatrixpair > | imatrixpairlist |
typedef struct Inspectable::ILayer | ILayer |
typedef struct Inspectable::IConnection | IConnection |
typedef std::list< ILayer > | ilayerlist |
typedef std::list< IConnection > | iconnectionlist |
typedef std::list< const Inspectable * > | inspectableList |
The GenContext class.
This class is used for create a context for some gens. This mean it saves all gens which have the same prototype and are a part of an individual which are in ONE generation. It can be useful for some statistical calculation or for optimizing the mutation factor.
The Gen Context is inside the gen. alg. only saved in the GenPrototype.
GenContext | ( | GenPrototype * | prototype | ) |
constructor to create a GenContext.
Information which the class need are the prototype (name an group of gens).
prototype | (GenPrototype*) Pointer to the prototype. |
|
virtual |
destructor to delete a GenContext.
|
inline |
|
inline |
[inline], [const] This function gives all gens which are saved in this context back.
|
inline |
[inline], [const]
This function gives the prototype for hich are the context is make back.
|
inline |
[inline] This function removes one gen which is saved inside the context (but NO deleting of the gen!!!).
param gen (Gen*) The gen, which should be removed
|
static |
restore all GenContext
void update | ( | double | factor = 1.5 | ) |
This function makes an update on the statistical values.
factor | (double) this factor is normal 1.5 and is for the whisker distance in the analysation |
|
protected |
the average of the gens
|
protected |
the max value of the gens
|
protected |
the median of the gens
|
protected |
the min value of the gens
|
protected |
(GenPrototyp*) the prototype for which are the context is.
|
protected |
the under quartil of the gens
|
protected |
the upper quartil of the gens
|
protected |
(vector<Gen*> Storage for all Genes which are saved in this context.
|
protected |
the under whisker of the gens
|
protected |
the upper whisker of the gens