Gecode::Int::Arithmetic::PowOps Class Reference
Other available functionality » Integer propagators

Operations for power and nroot propagators. More...

`#include <arithmetic.hh>`

## Public Member Functions

| PowOps (int n)
| Initialize with exponent n.
bool | even (void) const
| Return whether exponent is even.
int | exp (void) const
| Return exponent.
void | exp (int m)
| Set exponent to m.
template<class IntType>
IntType | pow (IntType x) const
| Return where .
int | tpow (int x) const
| Return where truncated to integer limits.
int | fnroot (int x) const
| Return where x must be non-negative and .
int | cnroot (int x) const
| Return where x must be non-negative and .

## Protected Member Functions

bool | powgr (long long int r, int x) const
| Test whether .
bool | powle (long long int r, int x) const
| Test whether .

## Static Protected Member Functions

static bool | even (int m)
| Return whether m is even.

## Protected Attributes

int | n
| The exponent and root index.

## Detailed Description

Operations for power and nroot propagators.

Requires

#include <gecode/int/arithmetic.hh>
arithmetic.hh

Definition at line 327 of file arithmetic.hh.

## Constructor & Destructor Documentation

## PowOps()

Gecode::Int::Arithmetic::PowOps::PowOps | ( | int | n | ) |

inline

Initialize with exponent n.

Definition at line 37 of file pow-ops.hpp.

## Member Function Documentation

## even() [1/2]

bool Gecode::Int::Arithmetic::PowOps::even | ( | int | m | ) |

inline static protected

Return whether m is even.

Definition at line 40 of file pow-ops.hpp.

## powgr()

bool Gecode::Int::Arithmetic::PowOps::powgr | ( | long long int | r,
|  | int | x ) const

inline protected

Test whether .

Definition at line 94 of file pow-ops.hpp.

## powle()

bool Gecode::Int::Arithmetic::PowOps::powle | ( | long long int | r,
|  | int | x ) const

inline protected

Test whether .

Definition at line 132 of file pow-ops.hpp.

## even() [2/2]

bool Gecode::Int::Arithmetic::PowOps::even | ( | void |  | ) | const

inline

Return whether exponent is even.

Definition at line 45 of file pow-ops.hpp.

## exp() [1/2]

int Gecode::Int::Arithmetic::PowOps::exp | ( | void |  | ) | const

inline

Return exponent.

Definition at line 50 of file pow-ops.hpp.

## exp() [2/2]

void Gecode::Int::Arithmetic::PowOps::exp | ( | int | m | ) |

inline

Set exponent to m.

Definition at line 55 of file pow-ops.hpp.

## pow()

template<class IntType>

IntType Gecode::Int::Arithmetic::PowOps::pow | ( | IntType | x | ) | const

inline

Return where .

Definition at line 61 of file pow-ops.hpp.

## tpow()

int Gecode::Int::Arithmetic::PowOps::tpow | ( | int | x | ) | const

inline

Return where truncated to integer limits.

Definition at line 75 of file pow-ops.hpp.

## fnroot()

int Gecode::Int::Arithmetic::PowOps::fnroot | ( | int | x | ) | const

inline

Return where x must be non-negative and .

Definition at line 115 of file pow-ops.hpp.

## cnroot()

int Gecode::Int::Arithmetic::PowOps::cnroot | ( | int | x | ) | const

inline

Return where x must be non-negative and .

Definition at line 153 of file pow-ops.hpp.

## Member Data Documentation

## n

int Gecode::Int::Arithmetic::PowOps::n

protected

The exponent and root index.

Definition at line 330 of file arithmetic.hh.

The documentation for this class was generated from the following files:

- gecode/int/arithmetic.hh
- gecode/int/arithmetic/pow-ops.hpp