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
Remove some not used namespace declarations.
[genetic.git]
/
include
/
chromosome.h
diff --git
a/include/chromosome.h
b/include/chromosome.h
index 08d24c92c5b422290c0c3198ebf0be700b418963..bad2bdd410efb1805e72b6a4b3715a4888cf7750 100644
(file)
--- a/
include/chromosome.h
+++ b/
include/chromosome.h
@@
-5,8
+5,6
@@
#include "gene.h"
#include "gene.h"
-using namespace std;
-
namespace genetic {
/**
* Chromosome of given Genes.
namespace genetic {
/**
* Chromosome of given Genes.
@@
-22,7
+20,7
@@
namespace genetic {
/**
* Genes of the chromosome
*/
/**
* Genes of the chromosome
*/
- vector<_Gene> genes;
+
std::
vector<_Gene> genes;
template<typename> friend class Chromosome;
public:
template<typename> friend class Chromosome;
public:
@@
-36,7
+34,7
@@
namespace genetic {
*
* @param genes vector containing Genes to use in Chromosome
*/
*
* @param genes vector containing Genes to use in Chromosome
*/
- Chromosome(
vector<_Gene>
genes) {
+ Chromosome(
const std::vector<_Gene>&
genes) {
this->genes = genes;
}
this->genes = genes;
}
@@
-70,7
+68,7
@@
namespace genetic {
*
* @return i-th Gene in the current Chromosome
*/
*
* @return i-th Gene in the current Chromosome
*/
- _Gene& operator[](unsigned int i) {
+ _Gene& operator[](
const
unsigned int i) {
return this->genes[i];
}
};
return this->genes[i];
}
};