[shark] 43/58: do not pick random parents for MOCMA

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Mar 16 10:05:32 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 a64f7405a53bfb75cd46d6638f4f4f2804adfaf5
Author: Oswin Krause <oswin.krause at di.ku.dk>
Date:   Wed Feb 10 09:01:01 2016 +0100

    do not pick random parents for MOCMA
---
 include/shark/Algorithms/DirectSearch/MOCMA.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/shark/Algorithms/DirectSearch/MOCMA.h b/include/shark/Algorithms/DirectSearch/MOCMA.h
index 1a32863..504c39f 100644
--- a/include/shark/Algorithms/DirectSearch/MOCMA.h
+++ b/include/shark/Algorithms/DirectSearch/MOCMA.h
@@ -210,7 +210,7 @@ protected:
 	std::vector<IndividualType> generateOffspring()const{
 		std::vector<IndividualType> offspring(mu());
 		for(std::size_t i = 0; i != mu(); ++i){
-			std::size_t parentId = Rng::discrete(0, mu()-1);
+			std::size_t parentId = i;
 			offspring[i] = m_parents[parentId];
 			offspring[i].mutate();
 			offspring[i].parent() = parentId;

-- 
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