The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cChoosOperator.h
Go to the documentation of this file.
1
/**
2
* @file cChoosOperator
3
* file name: cChoosOperator.h
4
* @author Betti Oesterholz
5
* @date 25.03.2010
6
* @mail webmaster@BioKom.info
7
*
8
* System: C++
9
*
10
* This header specifies a class for selecting a good operator.
11
* Copyright (C) @c GPL3 2010 Betti Oesterholz
12
*
13
* This program is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License (GPL) as
15
* published by the Free Software Foundation, either version 3 of the
16
* License, or any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU Lesser General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
*
26
*
27
* This header specifies a class for selecting a good operator.
28
* The selection method is weelselction.
29
* Every operator has a propability p_i of selection which, is proportional
30
* to it's fitnessvalue plus the ratio of the fitnesssum of all operations
31
* divieded by the number of operations and 1000 .
32
*
33
* minFitness = the minimum fitness (@see cOperatorFitnessAlgorithm::getMinFitness())
34
* minFitness2 = minFitness - fitnesssum / (#operations * 1000))
35
* fitnesssum2 = fitnesssum - minFitness2 * #operations
36
* p_i = (fitness_i - minFitness2) / fitnesssum2
37
*
38
* @see cOperation
39
* @see cOperatorFitnessAlgorithm
40
* @see cEnviroment
41
*/
42
/*
43
History:
44
25.03.2010 Oesterholz created
45
06.06.2010 Oesterholz method getClassName() added
46
*/
47
48
49
#ifndef ___C_CHOOS_OPERATOR_H__
50
#define ___C_CHOOS_OPERATOR_H__
51
52
#include "version.h"
53
54
#include "
cOperation.h
"
55
#include "
cOperatorFitnessAlgorithm.h
"
56
57
#include <string>
58
59
60
namespace
enviroment{
61
62
63
class
cChoosOperator
{
64
public
:
65
66
/**
67
* standardconstructor
68
*/
69
cChoosOperator
();
70
71
/**
72
* Destructor of the class cChoosOperator.
73
*/
74
virtual
~cChoosOperator
();
75
76
/**
77
* This method selects an operator. The selection method is weelselction.
78
* Every operator has a propability p_i of selection which, is proportional
79
* to it's fitnessvalue plus the ratio of the fitnesssum of all operations
80
* divieded by the number of operations and 1000 .
81
*
82
* minFitness = the minimum fitness (@see cOperatorFitnessAlgorithm::getMinFitness())
83
* minFitness2 = minFitness - fitnesssum / (#operations * 1000))
84
* fitnesssum2 = fitnesssum - minFitness2 * #operations
85
* p_i = (fitness_i - minFitness2) / fitnesssum2
86
*
87
* @return a pointer to the choosen operator, or NULL if non can be selected
88
* Beware: You have to delete the returned object after usage.
89
*/
90
virtual
cOperation
*
choosOperator
()
const
;
91
92
/**
93
* This method clones this object.
94
*
95
* @return a clone of this object
96
*/
97
virtual
cChoosOperator
*
clone
()
const
;
98
99
/**
100
* @return the name of this class
101
*/
102
virtual
std::string
getClassName
()
const
;
103
104
105
};
//end class cChoosOperator
106
107
108
};
//end namespace enviroment
109
110
#endif //___C_CHOOS_OPERATOR_H__
111
112
113
114
115
116
117
enviroment
incl
cChoosOperator.h
Generated on Thu Feb 14 2013 14:06:55 for The Fib multimedia system by
1.8.1