- Gecode
- Int
- Arithmetic
- PowOps

Operations for power and nroot propagators. More...
#include <arithmetic.hh>
Public Member Functions | |
| PowOps (int n) | |
| Initialize with exponent n. More... | |
| bool | even (void) const |
| Return whether exponent is even. More... | |
| int | exp (void) const |
| Return exponent. More... | |
| void | exp (int m) |
| Set exponent to m. More... | |
| template<class IntType > | |
| IntType | pow (IntType x) const |
Return where . More... | |
| int | tpow (int x) const |
Return where truncated to integer limits. More... | |
| int | fnroot (int x) const |
Return where x must be non-negative and . More... | |
| int | cnroot (int x) const |
Return where x must be non-negative and . More... | |
Protected Member Functions | |
| bool | powgr (long long int r, int x) const |
Test whether . More... | |
| bool | powle (long long int r, int x) const |
Test whether . More... | |
Static Protected Member Functions | |
| static bool | even (int m) |
| Return whether m is even. More... | |
Protected Attributes | |
| int | n |
| The exponent and root index. More... | |
Operations for power and nroot propagators.
Requires
Definition at line 327 of file arithmetic.hh.
|
inline |
Initialize with exponent n.
Definition at line 37 of file pow-ops.hpp.
|
inlinestaticprotected |
Return whether m is even.
Definition at line 40 of file pow-ops.hpp.
|
inlineprotected |
Test whether
.
Definition at line 94 of file pow-ops.hpp.
|
inlineprotected |
Test whether
.
Definition at line 132 of file pow-ops.hpp.
|
inline |
Return whether exponent is even.
Definition at line 45 of file pow-ops.hpp.
|
inline |
Return exponent.
Definition at line 50 of file pow-ops.hpp.
|
inline |
Set exponent to m.
Definition at line 55 of file pow-ops.hpp.
|
inline |
Return
where
.
Definition at line 61 of file pow-ops.hpp.
|
inline |
Return
where
truncated to integer limits.
Definition at line 75 of file pow-ops.hpp.
|
inline |
Return
where x must be non-negative and
.
Definition at line 115 of file pow-ops.hpp.
|
inline |
Return
where x must be non-negative and
.
Definition at line 153 of file pow-ops.hpp.
|
protected |
The exponent and root index.
Definition at line 330 of file arithmetic.hh.