From df8a3c5fdcf8d0e9616418523e7d56416765523b Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Fri, 25 May 2012 14:36:52 +0100 Subject: [PATCH] fix a recent bug in StatesIndexer.h --- packages/CLPBN/horus/Indexer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/CLPBN/horus/Indexer.h b/packages/CLPBN/horus/Indexer.h index 36714b827..de082fd45 100644 --- a/packages/CLPBN/horus/Indexer.h +++ b/packages/CLPBN/horus/Indexer.h @@ -20,7 +20,8 @@ class StatesIndexer StatesIndexer (const Ranges& ranges, bool calcOffsets = true) { li_ = 0; - size_ = std::accumulate (ranges.begin(), ranges.end(), 0); + size_ = std::accumulate (ranges.begin(), ranges.end(), 1, + std::multiplies()); indices_.resize (ranges.size(), 0); ranges_ = ranges; if (calcOffsets) {