[opengm] 36/386: fixed operator[] for opengm::Weights

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:35:02 UTC 2016


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

ghisvail-guest pushed a commit to branch debian/master
in repository opengm.

commit 686ef02531a8a8a4b40d9c2dd2f3deb4484d3669
Author: Jan Funke <funke at ini.ch>
Date:   Mon Dec 15 14:32:34 2014 +0100

    fixed operator[] for opengm::Weights
---
 include/opengm/graphicalmodel/weights.hxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/opengm/graphicalmodel/weights.hxx b/include/opengm/graphicalmodel/weights.hxx
index 3f77619..f31d874 100644
--- a/include/opengm/graphicalmodel/weights.hxx
+++ b/include/opengm/graphicalmodel/weights.hxx
@@ -25,8 +25,12 @@ namespace learning{
          weights_[pi]=value;
       }
 
-      ValueType operator[](const size_t pi)const{
-         return getWeight(pi);
+      const ValueType& operator[](const size_t pi)const{
+         return weights_[pi];
+      }
+
+      ValueType& operator[](const size_t pi) {
+         return weights_[pi];
       }
 
       size_t numberOfWeights()const{

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git



More information about the debian-science-commits mailing list