dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
genetic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Integrate Command Library.
[genetic.git]
/
include
/
selection
/
selection.h
diff --git
a/include/selection/selection.h
b/include/selection/selection.h
index dd6e846299b0ae34c159843e883b63a5b6c43082..de899c11d24b1b840ebe6c0a31e2831e2cfaa0c3 100644
(file)
--- a/
include/selection/selection.h
+++ b/
include/selection/selection.h
@@
-5,8
+5,6
@@
#include "generation.h"
#include "../fitness/fitness.h"
#include "generation.h"
#include "../fitness/fitness.h"
-using namespace std;
-
namespace genetic {
// namespace selection {
/**
namespace genetic {
// namespace selection {
/**
@@
-43,7
+41,7
@@
namespace genetic {
* checked.
* @return Value of the Fitness function
*/
* checked.
* @return Value of the Fitness function
*/
- FitnessValueType checkChromosomeFitness(
_Chromosome
chromosome) {
+ FitnessValueType checkChromosomeFitness(
const _Chromosome&
chromosome) {
this->fitness.chromosome = chromosome;
return fitness.calculate();
}
this->fitness.chromosome = chromosome;
return fitness.calculate();
}
@@
-63,7
+61,7
@@
namespace genetic {
* applied
* @param _fitness Fitness function to use in Selection
*/
* applied
* @param _fitness Fitness function to use in Selection
*/
- Selection(
Generation<_Chromosome>
_generation, GeneticFitness& _fitness) :
+ Selection(
const Generation<_Chromosome>&
_generation, GeneticFitness& _fitness) :
generation(_generation), fitness(_fitness) {
}
generation(_generation), fitness(_fitness) {
}