[shark] 33/58: fixed issue #42
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Mar 16 10:05:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository shark.
commit 229bbceb4f5f7aff9f5951395388d1dd00b981a1
Author: Oswin Krause <oswin.krause at di.ku.dk>
Date: Sun Feb 7 09:37:09 2016 +0100
fixed issue #42
---
include/shark/Algorithms/DirectSearch/SMS-EMOA.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/shark/Algorithms/DirectSearch/SMS-EMOA.h b/include/shark/Algorithms/DirectSearch/SMS-EMOA.h
index 9941d9a..ce7e008 100644
--- a/include/shark/Algorithms/DirectSearch/SMS-EMOA.h
+++ b/include/shark/Algorithms/DirectSearch/SMS-EMOA.h
@@ -194,7 +194,7 @@ protected:
}
//copy points randomly
for(std::size_t i = numPoints; i != mu; ++i){
- std::size_t index = Rng::discrete(0,numPoints-1);
+ std::size_t index = Rng::discrete(0,startingPoints.size()-1);
m_pop[i].searchPoint() = startingPoints[index];
m_pop[i].penalizedFitness() = functionValues[index];
m_pop[i].unpenalizedFitness() = functionValues[index];
@@ -250,7 +250,7 @@ private:
m_mutator( mate1 );
return mate1;
} else {
- m_mutator( mate1 );
+ m_mutator( mate2 );
return mate2;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git
More information about the debian-science-commits
mailing list