[shark] 42/79: Update MultiNomialDistribution.h

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Nov 26 15:40:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository shark.

commit 881cbb713f7f6d09acdbe6c0f1f34ca007a1d405
Author: Christian Igel <igel at diku.dk>
Date:   Fri Oct 30 09:49:29 2015 +0100

    Update MultiNomialDistribution.h
    
    renamed variables
---
 .../shark/Statistics/Distributions/MultiNomialDistribution.h   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/shark/Statistics/Distributions/MultiNomialDistribution.h b/include/shark/Statistics/Distributions/MultiNomialDistribution.h
index 7a0303a..fba1a16 100644
--- a/include/shark/Statistics/Distributions/MultiNomialDistribution.h
+++ b/include/shark/Statistics/Distributions/MultiNomialDistribution.h
@@ -120,18 +120,18 @@ public:
 		// appropriately allocate the larger outcomes over the
 		// overall uniform mixture.
 		while(!smaller.empty() && !larger.empty()){
-			std::size_t small = smaller.front();
-			std::size_t large = larger.front();
+			std::size_t smallIndex = smaller.front();
+			std::size_t largeIndex = larger.front();
 			smaller.pop_front();
 			larger.pop_front();
 
 			m_J[small] = large;
-			m_q[large]  -= 1.0 - m_q[small];
+			m_q[large]  -= 1.0 - m_q[smallIndex];
 
 			if(m_q[large] < 1.0)
-				smaller.push_back(large);
+				smaller.push_back(largeIndex);
 			else
-				larger.push_back(large);
+				larger.push_back(largeIndex);
 		}
 		for(std::size_t i = 0; i != larger.size(); ++i){
 			m_q[larger[i]]=std::min(m_q[larger[i]],1.0);

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