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