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

Method pow

gecode/int/arithmetic/pow-ops.hpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59 template<class IntType>
60 inline IntType
61 PowOps::pow(IntType x) const {
62 int m = n;
63 IntType p = 1;
64 do {
65 if (even(m)) {
66 x *= x; m >>= 1;
67 } else {
68 p *= x; m--;
69 }
70 } while (m > 0);
71 return p;
72 }
73
74 inline int
75 PowOps::tpow(int _x) const {

Callers 5

prop_pow_plus_bndFunction · 0.45
prop_pow_bndFunction · 0.45
postMethod · 0.45
propagateMethod · 0.45
valMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected