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
Big optimizations and securing code.
[genetic.git]
/
include
/
generation.h
diff --git
a/include/generation.h
b/include/generation.h
index 88942ec0d9fd2a0cac8e19b3762bee8cef227da8..f460a7fbe62cc408a6034b8ad42bf84420d9f78d 100644
(file)
--- a/
include/generation.h
+++ b/
include/generation.h
@@
-32,7
+32,7
@@
namespace genetic {
*
* @param chromosomes vector containing Chromosomes to use in Generation
*/
*
* @param chromosomes vector containing Chromosomes to use in Generation
*/
- Generation(
vector<_Chromosome>
chromosomes) {
+ Generation(
const std::vector<_Chromosome>&
chromosomes) {
this->chromosomes = chromosomes;
}
this->chromosomes = chromosomes;
}
@@
-66,7
+66,7
@@
namespace genetic {
*
* @return i-th Chromosome in the current Generation
*/
*
* @return i-th Chromosome in the current Generation
*/
- _Chromosome& operator[](unsigned int i) {
+ _Chromosome& operator[](
const
unsigned int i) {
return this->chromosomes[i];
}
};
return this->chromosomes[i];
}
};