Debian Codegraph @

include/BALL/DOCKING/GENETICDOCK/geneticIndividual.h

raw symbols SCIP
1 // ----------------------------------------------------
2 // $Maintainer: Marcel Schumann $
3 // $Authors: Jan Fuhrmann, Marcel Schumann $
4 // ----------------------------------------------------
5
6 #ifndef BALL_DOCKING_GENETICDOCK_GENETICINDIVIDUAL_H
7 #define BALL_DOCKING_GENETICDOCK_GENETICINDIVIDUAL_H
8
9 #include <vector>
10
11 #include <BALL/DOCKING/GENETICDOCK/genes.h>
12
13 namespace BALL
14 {
15 class BALL_EXPORT BALL_DEPRECATED GeneticIndividual
16 {
17 public:
18 /** standard constructor
19 */
20 GeneticIndividual();
21
22 /** copy constructor
23 */
24 GeneticIndividual(const GeneticIndividual& gi);
25
26 /** assigment operator
27 */
28 GeneticIndividual& operator= (const GeneticIndividual& gi);
29
30 /** destructor
31 */
32 ~GeneticIndividual();
33
34 /** smaller operator regarding fitness score
35 */
36 bool operator<(const GeneticIndividual& gi) const;
37
38 /** assigns fitness score
39 */
40 void setFitnessValue(const double& d);
41
42 /** get fitness score
43 */
44 double getFitnessValue();
45
46 /** assigns value to altered_
47 */
48 void setAltered(bool b);
49
50 /** true if individual has changed since the last computation of the fitness score
51 */
52 bool isAltered();
53
54 /** counts number of genes
55 */
56 Size numberOfGenes();
57
58 /** get i-th gene
59 */
60 GenericGene* getGene(const Size& i);
61
62 /** push back gene gg
63 */
64 void insert(GenericGene* gg);
65
66 /** mate two individuals
67 */
68 void mate(GeneticIndividual& parent, GeneticIndividual& offspring);
69
70 /** true if indiviual has been mutated
71 */
72 bool isMutated();
73
74 /** assigns value to mutated_
75 */
76 void setMutated(bool);
77
78 /** randomize all genes
79 */
80 void randomize();
81
82 private:
83
84 /** fitness score
85 */
86 double fitness_value_;
87
88 /** true if individual has changed since the last computation of the fitness score
89 */
90 bool altered_;
91
92 /** true if indiviual has been mutated
93 */
94 bool mutated_;
95
96 /** container for genes
97 */
98 std::vector<GenericGene*> genes_;
99 };
100 }
101
102 #endif /* BALL_DOCKING_GENETICDOCK_GENETICINDIVIDUAL_H */