MCPcopy Create free account
hub / github.com/Gecode/gecode / sumup

Method sumup

gecode/int/gcc/bnd-sup.hpp:376–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374
375 template<class Card>
376 forceinline int
377 PartialSum<Card>::sumup(int from, int to) const {
378 if (from <= to) {
379 return sum[to - firstValue] - sum[from - firstValue - 1];
380 } else {
381 assert(to - firstValue - 1 >= 0);
382 assert(to - firstValue - 1 < size);
383 assert(from - firstValue >= 0);
384 assert(from - firstValue < size);
385 return sum[to - firstValue - 1] - sum[from - firstValue];
386 }
387 }
388
389 template<class Card>
390 forceinline int

Callers 2

lbcMethod · 0.80
ubcMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected