BALL
1.4.79
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
DOCKING
GENETICDOCK
genes.h
Go to the documentation of this file.
1
// ----------------------------------------------------
2
// $Maintainer: Marcel Schumann $
3
// $Authors: Jan Fuhrmann, Marcel Schumann $
4
// ----------------------------------------------------
5
6
#ifndef BALL_DOCKING_GENETICDOCK_GENES_H
7
#define BALL_DOCKING_GENETICDOCK_GENES_H
8
9
#include <vector>
10
#include <
BALL/MATHS/quaternion.h
>
11
12
namespace
BALL
13
{
14
class
RandomNumberGenerator;
15
18
class
BALL_EXPORT
GenericGene
19
{
20
public
:
21
24
virtual
~GenericGene
(){};
25
28
virtual
GenericGene
* mate(
GenericGene
* gg) = 0;
29
32
virtual
void
mutate() = 0;
33
36
virtual
GenericGene
* clone() = 0;
37
40
virtual
void
randomize() = 0;
41
44
static
void
initializeRNG();
45
46
protected
:
47
50
static
RandomNumberGenerator
rng_
;
51
52
};
53
56
class
BALL_EXPORT
DoubleGene
:
public
GenericGene
57
{
58
public
:
59
62
DoubleGene
();
63
66
virtual
~
DoubleGene
();
67
70
DoubleGene
(
Size
i);
71
74
virtual
GenericGene
* mate(
GenericGene
* gg);
75
78
virtual
void
mutate();
79
82
std::vector<double> getValues();
83
86
void
setValue(std::vector<double> v);
87
90
virtual
GenericGene
* clone();
91
94
void
randomize();
95
96
private
:
97
100
std::vector<double> values_;
101
};
102
103
106
class
BALL_EXPORT
QuaternionGene
:
public
GenericGene
107
{
108
public
:
109
112
QuaternionGene
();
113
116
virtual
~
QuaternionGene
();
117
120
virtual
GenericGene
* mate(
GenericGene
* gg);
121
124
virtual
void
mutate();
125
128
Quaternion
getValue();
129
132
virtual
GenericGene
* clone();
133
136
void
randomize();
137
138
private
:
139
142
Quaternion
quat_;
143
144
};
145
146
147
}
148
149
#endif
/* BALL_DOCKING_GENETICDOCK_GENES_H */
BALL::TQuaternion< float >
BALL::GenericGene::~GenericGene
virtual ~GenericGene()
Definition:
genes.h:24
BALL::DoubleGene
Definition:
genes.h:56
BALL::RandomNumberGenerator
Definition:
randomNumberGenerator.h:63
BALL::GenericGene::rng_
static RandomNumberGenerator rng_
Definition:
genes.h:50
BALL::QuaternionGene
Definition:
genes.h:106
quaternion.h
BALL_SIZE_TYPE
BALL::GenericGene
Definition:
genes.h:18
BALL_EXPORT
#define BALL_EXPORT
Definition:
COMMON/global.h:50
Generated by
1.8.7