#include <GenContext.h>
Inherits Inspectable.
Inheritance diagram for GenContext:
Public Member Functions | |
GenContext (GenPrototype *prototype) | |
constructor to create a GenContext. | |
virtual | ~GenContext () |
destructor to delete a GenContext. | |
GenPrototype * | getPrototype (void) const |
[inline], [const] | |
void | addGen (Gen *gen) |
[inline] This function add a Gen to the Context. | |
void | removeGen (Gen *gen) |
[inline] This function removes one gen which is saved inside the context (but NO deleting of the gen!!!). | |
const std::vector< Gen * > & | getGene (void) const |
[inline], [const] This function gives all gens which are saved in this context back. | |
void | update (double factor=1.5) |
This function makes an update on the statistical values. | |
Static Public Member Functions | |
static bool | restore () |
restore all GenContext | |
Protected Attributes | |
std::vector< Gen * > | m_storage |
(vector<Gen*> Storage for all Genes which are saved in this context. | |
GenPrototype * | m_prototype |
(GenPrototyp*) the prototype for which are the context is. | |
double | m_min |
the min value of the gens | |
double | m_w1 |
the under whisker of the gens | |
double | m_q1 |
the under quartil of the gens | |
double | m_med |
the median of the gens | |
double | m_avg |
the average of the gens | |
double | m_q3 |
the upper quartil of the gens | |
double | m_w3 |
the upper whisker of the gens | |
double | m_max |
the max value of the gens |
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. |
~GenContext | ( | ) | [virtual] |
destructor to delete a GenContext.
void addGen | ( | Gen * | gen | ) | [inline] |
const std::vector<Gen*>& getGene | ( | void | ) | const [inline] |
[inline], [const] This function gives all gens which are saved in this context back.
GenPrototype* getPrototype | ( | void | ) | const [inline] |
[inline], [const]
This function gives the prototype for hich are the context is make back.
void removeGen | ( | Gen * | gen | ) | [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
bool restore | ( | ) | [static] |
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 |
double m_avg [protected] |
the average of the gens
double m_max [protected] |
the max value of the gens
double m_med [protected] |
the median of the gens
double m_min [protected] |
the min value of the gens
GenPrototype* m_prototype [protected] |
(GenPrototyp*) the prototype for which are the context is.
double m_q1 [protected] |
the under quartil of the gens
double m_q3 [protected] |
the upper quartil of the gens
(vector<Gen*> Storage for all Genes which are saved in this context.
double m_w1 [protected] |
the under whisker of the gens
double m_w3 [protected] |
the upper whisker of the gens