Gecode::Int Namespace Reference

Finite domain integers. More...

## Namespaces

namespace | Limits
| Numerical limits for integer variables.
namespace | LDSB
| Symmetry breaking for integer variables.
namespace | Arithmetic
| Numerical (arithmetic) propagators.
namespace | BinPacking
| Bin-packing propagators
namespace | Bool
| Boolean propagators.
namespace | Branch
| Integer branchers.
namespace | Channel
| Channel propagators
namespace | Circuit
| Circuit propagators
namespace | Count
| Counting propagators.
namespace | Cumulative
| Scheduling for cumulative resources
namespace | Cumulatives
| Cumulatives propagators
namespace | Distinct
| Distinct propagators
namespace | Dom
| Domain propagators.
namespace | Element
| Element propagators
namespace | Exec
| Synchronized execution.
namespace | Extensional
| Extensional propagators
namespace | GCC
| Global cardinality propagators (Counting).
namespace | Linear
| Linear propagators
namespace | Member
| Membership propagators.
namespace | NoOverlap
| No-overlap propagators
namespace | NValues
| Number of values propagators.
namespace | Order
| Int for ordering two tasks
namespace | Precede
| Value precedence propagators.
namespace | Rel
| Simple relation propagators.
namespace | Sequence
| Sequence propagators
namespace | Sorted
| Sorted propagators
namespace | Unary
| Int for unary resources
namespace | Unshare
| Unsharing shared variables.
namespace | ViewValGraph
| Support classes for propagators using a view-value graph.

## Classes

class | TaskViewTraits< Cumulative::ManFixPTaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Cumulative::ManFixPTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Cumulative::ManFixPSETaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Cumulative::ManFixPSETaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Cumulative::OptFixPTaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Cumulative::OptFixPTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Cumulative::OptFixPSETaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Cumulative::OptFixPSETaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Cumulative::ManFlexTaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Cumulative::ManFlexTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Cumulative::OptFlexTaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Cumulative::OptFlexTaskBwd >
| Task view traits for backward task views. More...
class | TaskTraits< Cumulative::ManFixPTask >
| Task traits for mandatory fixed tasks. More...
class | TaskTraits< Cumulative::ManFixPSETask >
| Task traits for mandatory fixed tasks. More...
class | TaskTraits< Cumulative::OptFixPTask >
| Task traits for optional fixed tasks. More...
class | TaskTraits< Cumulative::OptFixPSETask >
| Task traits for optional fixed tasks. More...
class | TaskTraits< Cumulative::ManFlexTask >
| Task traits for mandatory flexible tasks. More...
class | TaskTraits< Cumulative::OptFlexTask >
| Task traits for optional flexible tasks. More...
class | OutOfLimits
| Exception: Value out of limits More...
class | NotZeroOne
| Exception: Not 0/1 integer More...
class | VariableEmptyDomain
| Exception: Variable created with empty domain More...
class | TooFewArguments
| Exception: Too few arguments available in argument array More...
class | ArgumentSizeMismatch
| Exception: Arguments are of different size More...
class | ArgumentSame
| Exception: Arguments contain same variable multiply More...
class | UnknownRelation
| Exception: Unknown relation passed as argument More...
class | UnknownOperation
| Exception: Unknown operation passed as argument More...
class | IllegalOperation
| Exception: Illegal operation passed as argument More...
class | UnknownBranching
| Exception: Unknown value or variable selection passed as argument More...
class | UnknownReifyMode
| Exception: Unknown reification mode passed as argument More...
class | ValOfUnassignedVar
| Exception: Attempt to access value of unassigned variable More...
class | UninitializedTupleSet
| Exception: uninitialized tuple set More...
class | NotYetFinalized
| Exception: Tuple set not yet finalized More...
class | AlreadyFinalized
| Exception: Tuple set already finalized More...
class | LDSBUnbranchedVariable
| Exception: Variable in symmetry not branched on More...
class | LDSBBadValueSelection
| Exception: Value selection incompatible with LDSB More...
class | ViewRanges< GCC::CardView >
| Range iterator for indexed problem variables More...
class | IdxView
| Class for pair of index and view. More...
class | ViewToVarArg
| Class to map VarArg type to view. More...
class | IdxViewArray
| An array of IdxView pairs. More...
class | ViewToVarArg< IntView >
| VarArg type for integer views. More...
class | ViewToVarArg< MinusView >
| VarArg type for minus views. More...
class | ViewToVarArg< BoolView >
| VarArg type for Boolean views. More...
class | ViewToVarArg< NegBoolView >
| VarArg type for Boolean views. More...
class | ReUnaryPropagator
| Reified unary propagator. More...
class | ReBinaryPropagator
| Reified binary propagator. More...
class | ReMixBinaryPropagator
| Reified mixed binary propagator. More...
class | Relax
| Class for posting equalities for non-relaxed variables. More...
class | SupportValues
| Support value iterator and recorder More...
class | ManToOptTask
| Class to define an optional from a mandatory task. More...
class | FwdToBwd
| Task mapper: turns a task view into its dual. More...
class | TaskViewTraits
| Traits class for mapping task views to tasks. More...
class | TaskTraits
| Traits class for mapping tasks to task views. More...
class | TaskArray
| Task array. More...
class | TaskViewArray
| Task view array. More...
class | TaskViewIter
| Allows to iterate over task views according to a specified order. More...
class | ManTaskViewIter
| Allows to iterate over mandatory task views according to a specified order. More...
class | TaskTree
| Task trees for task views with node type Node. More...
class | TaskProp
| Propagator for tasks More...
class | PLB
| Class for defining basic propagation level. More...
class | PLA
| Class for defining advanced propagation level. More...
class | PLBA
| Class for defining basic and advanced propagation level. More...
class | Event
| Time-tabling event for task. More...
class | StoEst
| Sort by earliest start times. More...
class | StoEct
| Sort by earliest completion times. More...
class | StoLst
| Sort by latest start times. More...
class | StoLct
| Sort by latest completion times. More...
class | SortMap
| Sorting maps rather than tasks. More...
class | BoolTraceView
| Duplicate of a Boolean view. More...
class | IntTraceView
| Duplicate of an integer view. More...
class | TaskViewTraits< Unary::ManFixPTaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Unary::ManFixPTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Unary::ManFixPSETaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Unary::ManFixPSETaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Unary::OptFixPTaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Unary::OptFixPTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Unary::OptFixPSETaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Unary::OptFixPSETaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Unary::ManFlexTaskFwd >
| Task view traits for forward task views. More...
class | TaskViewTraits< Unary::ManFlexTaskBwd >
| Task view traits for backward task views. More...
class | TaskViewTraits< Unary::OptFlexTaskFwd >
| Task view traits for forward optional task views. More...
class | TaskViewTraits< Unary::OptFlexTaskBwd >
| Task view traits for backward task views. More...
class | TaskTraits< Unary::ManFixPTask >
| Task traits for mandatory fixed tasks. More...
class | TaskTraits< Unary::ManFixPSETask >
| Task traits for mandatory fixed tasks. More...
class | TaskTraits< Unary::OptFixPTask >
| Task traits for optional fixed tasks. More...
class | TaskTraits< Unary::OptFixPSETask >
| Task traits for optional fixed tasks. More...
class | TaskTraits< Unary::ManFlexTask >
| Task traits for mandatory flexible tasks. More...
class | TaskTraits< Unary::OptFlexTask >
| Task traits for optional flexible tasks. More...
class | ValSet
| Class for storing values of already assigned views. More...
class | IntDelta
| Integer delta information for advisors. More...
class | IntVarImp
| Integer variable implementation. More...
class | IntVarImpFwd
| Range iterator for ranges of integer variable implementation. More...
class | IntVarImpBwd
| Backward iterator for ranges of integer variable implementations. More...
class | BoolVarImp
| Boolean variable implementation. More...
class | ViewRanges
| Range iterator for integer views. More...
class | ViewValues
| Value iterator for integer views. More...
class | IntView
| Integer view for integer variables. More...
class | MinusView
| Minus integer view. More...
class | OffsetView
| Offset integer view. More...
class | NoOffset
| Converter without offsets. More...
class | Offset
| Converter with fixed offset. More...
class | ScaleView
| Scale integer view (template). More...
class | ConstIntView
| Constant integer view. More...
class | ZeroIntView
| Zero integer view. More...
class | ViewDiffRanges
| Range iterator for cached integer views More...
class | CachedView
| Cached integer view. More...
class | BoolView
| Boolean view for Boolean variables. More...
class | NegBoolView
| Negated Boolean view. More...
class | ViewRanges< BoolView >
| Range iterator for Boolean variable views More...
class | ViewRanges< CachedView< View > >
| Range iterator for offset integer views More...
class | ViewRanges< ConstIntView >
| Range iterator for constant integer views More...
class | ViewRanges< IntView >
| Range iterator for integer variable views More...
class | ViewRanges< MinusView >
| Range iterator for minus integer views More...
class | ViewRanges< NegBoolView >
| Range iterator for negated Boolean variable views More...
class | ViewRanges< OffsetView >
| Range iterator for offset integer views More...
class | ViewRanges< IntScaleView >
| Range iterator for integer-precision scale integer views More...
class | ViewRanges< LLongScaleView >
| Range iterator for long long int-precision scale integer views More...
class | ViewRanges< ZeroIntView >
| Range iterator for constant integer views More...
class | IntVarImpBase
| Base-class for Int-variable implementations. More...
class | BoolVarImpBase
| Base-class for Bool-variable implementations. More...
class | IntVarImpConf
| Configuration for Int-variable implementations. More...
class | BoolVarImpConf
| Configuration for Bool-variable implementations. More...
class | ViewToVarArg< Gecode::Set::ConstSetView >
| VarArg type for constant Set views. More...
class | ViewToVarArg< Gecode::Set::SetView >
| VarArg type for Set views. More...
class | ViewToVarArg< Gecode::Set::SingletonView >
| VarArg type for singleton views. More...

## Typedefs

typedef unsigned int | BoolStatus
| Type for status of a Boolean variable.

## Enumerations

enum | SortTaskOrder { STO_EST , STO_ECT , STO_LST , STO_LCT }
| How to sort tasks. More...
enum | RelTest { RT_FALSE = 0 , RT_MAYBE = 1 , RT_TRUE = 2 }
| Result of testing relation. More...
enum | BoolTest { BT_NONE , BT_SAME , BT_COMP }
| Boolean tests. More...

## Functions

template<class IntType>
IntType | ceil_div_pp (IntType x, IntType y)
| Compute where x and y are non-negative.
template<class IntType>
IntType | floor_div_pp (IntType x, IntType y)
| Compute where x and y are non-negative.
template<class IntType>
IntType | ceil_div_px (IntType x, IntType y)
| Compute where x is non-negative.
template<class IntType>
IntType | floor_div_px (IntType x, IntType y)
| Compute where x is non-negative.
template<class IntType>
IntType | ceil_div_xp (IntType x, IntType y)
| Compute where y is non-negative.
template<class IntType>
IntType | floor_div_xp (IntType x, IntType y)
| Compute where y is non-negative.
template<class IntType>
IntType | ceil_div_xx (IntType x, IntType y)
| Compute .
template<class IntType>
IntType | floor_div_xx (IntType x, IntType y)
| Compute .
template<class Char, class Traits, class View>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
template<class TaskView, SortTaskOrder sto, bool inc>
void | sort (TaskViewArray< TaskView > &t)
| Sort task view array t according to sto and inc (increasing or decreasing).
template<class TaskView, SortTaskOrder sto, bool inc>
void | sort (int *map, const TaskViewArray< TaskView > &t)
| Initialize and sort map for task view array t according to sto and inc (increasing or decreasing).
template<class TaskView, SortTaskOrder sto, bool inc>
void | sort (int *map, int n, const TaskViewArray< TaskView > &t)
| Sort map with size n for task view array t according to sto and inc (increasing or decreasing).
int | plus (int x, int y)
| Safe addition in case x is -Int::Limits::infinity.
long long int | plus (long long int x, long long int y)
| Safe addition in case x is -Int::Limits::llinfinity.
double | plus (double x, double y)
| Safe addition in case x is -Int::Limits::double_infinity.
template<class OptTask, class PL>
ExecStatus | purge (Space &home, Propagator &p, TaskArray< OptTask > &t)
| Purge optional tasks that are excluded and possibly rewrite propagator.
template<class OptTask, class PL, class Cap>
ExecStatus | purge (Space &home, Propagator &p, TaskArray< OptTask > &t, Cap c)
| Purge optional tasks that are excluded and possibly rewrite propagator.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const Event &e)
| Print event e on stream os.
template<class Char, class Traits, class Task>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const TaskArray< Task > &t)
template<class Char, class Traits, class TaskView>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const TaskViewArray< TaskView > &t)
template<class VX, class VY>
RelTest | rtest_eq_bnd (VX x, VY y)
| Test whether views x and y are equal (use bounds information).
template<class VX, class VY>
RelTest | rtest_eq_dom (VX x, VY y)
| Test whether views x and y are equal (use full domain information).
template<class VX>
RelTest | rtest_eq_bnd (VX x, int n)
| Test whether view x and integer n are equal (use bounds information).
template<class VX>
RelTest | rtest_eq_dom (VX x, int n)
| Test whether view x and integer n are equal (use full domain information).
template<class VX, class VY>
RelTest | rtest_nq_bnd (VX x, VY y)
| Test whether views x and y are different (use bounds information).
template<class VX, class VY>
RelTest | rtest_nq_dom (VX x, VY y)
| Test whether views x and y are different (use full domain information).
template<class VX>
RelTest | rtest_nq_bnd (VX x, int n)
| Test whether view x and integer n are different (use bounds information).
template<class VX>
RelTest | rtest_nq_dom (VX x, int n)
| Test whether view x and integer n are different (use full domain information).
template<class VX, class VY>
RelTest | rtest_lq (VX x, VY y)
| Test whether view x is less or equal than view y.
template<class VX>
RelTest | rtest_lq (VX x, int n)
| Test whether view x is less or equal than integer n.
template<class VX, class VY>
RelTest | rtest_le (VX x, VY y)
| Test whether view x is less than view y.
template<class VX>
RelTest | rtest_le (VX x, int n)
| Test whether view x is less than integer n.
template<class VX, class VY>
RelTest | rtest_gq (VX x, VY y)
| Test whether view x is greater or equal than view y.
template<class VX>
RelTest | rtest_gq (VX x, int n)
| Test whether view x is greater or equal than integer n.
template<class VX, class VY>
RelTest | rtest_gr (VX x, VY y)
| Test whether view x is greater than view y.
template<class VX>
RelTest | rtest_gr (VX x, int n)
| Test whether view x is greater than integer n.
BoolTest | bool_test (const BoolView &b0, const BoolView &b1)
BoolTest | bool_test (const BoolView &b0, const NegBoolView &b1)
BoolTest | bool_test (const NegBoolView &b0, const BoolView &b1)
BoolTest | bool_test (const NegBoolView &b0, const NegBoolView &b1)
template<class View>
bool | operator== (const CachedView< View > &x, const CachedView< View > &y)
template<class View>
bool | operator!= (const CachedView< View > &x, const CachedView< View > &y)
bool | operator== (const ConstIntView &x, const ConstIntView &y)
bool | operator!= (const ConstIntView &x, const ConstIntView &y)
bool | operator== (const MinusView &x, const MinusView &y)
bool | operator!= (const MinusView &x, const MinusView &y)
bool | operator== (const NegBoolView &x, const NegBoolView &y)
bool | operator!= (const NegBoolView &x, const NegBoolView &y)
bool | operator== (const OffsetView &x, const OffsetView &y)
bool | operator!= (const OffsetView &x, const OffsetView &y)
template<class Char, class Traits, class View>
std::basic_ostream< Char, Traits > & | print_view (std::basic_ostream< Char, Traits > &os, const View &x)
template<class Char, class Traits, class Val, class UnsVal>
std::basic_ostream< Char, Traits > & | print_scale (std::basic_ostream< Char, Traits > &os, const ScaleView< Val, UnsVal > &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IntView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const MinusView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const OffsetView &x)
template<class Char, class Traits, class View>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const CachedView< View > &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IntScaleView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const LLongScaleView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const ConstIntView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const ZeroIntView &)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const BoolView &x)
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const NegBoolView &x)
template<class VX, class VY>
RelTest | rtest_eq_dom_check (VX x, VY y)
template<class VX>
RelTest | rtest_eq_dom_check (VX x, int n)
template<class VX, class VY>
RelTest | rtest_nq_dom_check (VX x, VY y)
template<class VX>
RelTest | rtest_nq_dom_check (VX x, int n)
template<class Val, class UnsVal>
bool | operator== (const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
template<class Val, class UnsVal>
bool | operator!= (const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
bool | operator== (const ZeroIntView &, const ZeroIntView &)
bool | operator!= (const ZeroIntView &, const ZeroIntView &)
template<class Char, class Traits, class View>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
| Print array elements enclosed in curly brackets.
template<class Char, class Traits, class Task>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const TaskArray< Task > &t)
| Print array elements enclosed in curly brackets.
template<class Char, class Traits, class TaskView>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const TaskViewArray< TaskView > &t)
| Print array elements enclosed in curly brackets.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IntView &x)
| Print integer variable view.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const MinusView &x)
| Print integer minus view.

## Variables

const Gecode::ModEvent | ME_INT_FAILED = Gecode::ME_GEN_FAILED
| Domain operation has resulted in failure.
const Gecode::ModEvent | ME_INT_NONE = Gecode::ME_GEN_NONE
| Domain operation has not changed domain.
const Gecode::ModEvent | ME_INT_VAL = Gecode::ME_GEN_ASSIGNED
| Domain operation has resulted in a value (assigned variable).
const Gecode::ModEvent | ME_INT_BND = Gecode::ME_GEN_ASSIGNED + 1
| Domain operation has changed the minimum or maximum of the domain.
const Gecode::ModEvent | ME_INT_DOM = Gecode::ME_GEN_ASSIGNED + 2
| Domain operation has changed the domain.
const Gecode::PropCond | PC_INT_NONE = Gecode::PC_GEN_NONE
| Propagation condition to be ignored (convenience).
const Gecode::PropCond | PC_INT_VAL = Gecode::PC_GEN_ASSIGNED
| Propagate when a view becomes assigned (single value).
const Gecode::PropCond | PC_INT_BND = Gecode::PC_GEN_ASSIGNED + 1
| Propagate when minimum or maximum of a view changes.
const Gecode::PropCond | PC_INT_DOM = Gecode::PC_GEN_ASSIGNED + 2
| Propagate when domain changes.
const Gecode::ModEvent | ME_BOOL_FAILED = Gecode::ME_GEN_FAILED
| Domain operation has resulted in failure.
const Gecode::ModEvent | ME_BOOL_NONE = Gecode::ME_GEN_NONE
| Domain operation has not changed domain.
const Gecode::ModEvent | ME_BOOL_VAL = Gecode::ME_GEN_ASSIGNED
| Domain operation has resulted in a value (assigned variable).
const Gecode::PropCond | PC_BOOL_NONE = Gecode::PC_GEN_NONE
| Propagation condition to be ignored (convenience).
const Gecode::PropCond | PC_BOOL_VAL = Gecode::PC_GEN_ASSIGNED
| Propagate when a view becomes assigned (single value).

## View comparison

bool | operator== (const MinusView &x, const MinusView &y)
| Test whether views x and y are the same.
bool | operator!= (const MinusView &x, const MinusView &y)
| Test whether views x and y are not the same.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const OffsetView &x)
| Print integer offset view.
bool | operator== (const OffsetView &x, const OffsetView &y)
| Test whether views x and y are the same.
bool | operator!= (const OffsetView &x, const OffsetView &y)
| Test whether views x and y are not the same.
template<class View>
View & | operator() (View &x)
| Integer-precision integer scale view.
template<class View>
void | update (const NoOffset &)
| Integer-precision integer scale view.
template<class View>
int | offset (void) const
| Integer-precision integer scale view.
| Offset (int off)
| Integer-precision integer scale view.
void | update (const Offset &o)
| Integer-precision integer scale view.
int | offset (void) const
| Integer-precision integer scale view.
OffsetView | operator() (IntView &x)
| Integer-precision integer scale view.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IntScaleView &x)
| Print integer-precision integer scale view.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const LLongScaleView &x)
| Print long long-precision integer scale view.
template<class Val, class UnsVal>
bool | operator== (const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
| Test whether views x and y are the same.
template<class Val, class UnsVal>
bool | operator!= (const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
| Test whether views x and y are not the same.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const ConstIntView &x)
| Print integer constant integer view.
bool | operator== (const ConstIntView &x, const ConstIntView &y)
| Test whether views x and y are the same.
bool | operator!= (const ConstIntView &x, const ConstIntView &y)
| Test whether views x and y are not the same.
bool | operator== (const ZeroIntView &x, const ZeroIntView &y)
| Test whether views x and y are the same.
bool | operator!= (const ZeroIntView &x, const ZeroIntView &y)
| Test whether views x and y are the same.
template<class Char, class Traits, class View>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const CachedView< View > &x)
| Print integer cached view.
template<class View>
bool | operator== (const CachedView< View > &x, const CachedView< View > &y)
| Test whether views x and y are the same.
template<class View>
bool | operator!= (const CachedView< View > &x, const CachedView< View > &y)
| Test whether views x and y are not the same.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const BoolView &x)
| Print Boolean view.
bool | operator== (const NegBoolView &x, const NegBoolView &y)
| Test whether views x and y are the same.
bool | operator!= (const NegBoolView &x, const NegBoolView &y)
| Test whether views x and y are not the same.
template<class Char, class Traits>
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const NegBoolView &x)
| Print negated Boolean view.

## Test sharing between Boolean and negated Boolean views

NegBoolView
BoolTest | bool_test (const BoolView &b0, const BoolView &b1)
| Test whether views b0 and b1 are the same.
BoolTest | bool_test (const BoolView &b0, const NegBoolView &b1)
| Test whether views b0 and b1 are complementary.
BoolTest | bool_test (const NegBoolView &b0, const BoolView &b1)
| Test whether views b0 and b1 are complementary.
BoolTest | bool_test (const NegBoolView &b0, const NegBoolView &b1)
| Test whether views b0 and b1 are the same.

## Detailed Description

Finite domain integers.

The Gecode::Int namespace contains all functionality required to program propagators and branchers for finite domain integers. In addition, all propagators and branchers for finite domain integers provided by Gecode are contained as nested namespaces.

## Typedef Documentation

## BoolStatus

typedef unsigned int Gecode::Int::BoolStatus

Type for status of a Boolean variable.

Definition at line 484 of file var-imp.hpp.

## Enumeration Type Documentation

## SortTaskOrder

enum Gecode::Int::SortTaskOrder

How to sort tasks.

Enumerator
STO_EST | Sort by earliest start times.
STO_ECT | Sort by earliest completion times.
STO_LST | Sort by latest start times.
STO_LCT | Sort by latest completion times.

Definition at line 282 of file task.hh.

## RelTest

enum Gecode::Int::RelTest

Result of testing relation.

Enumerator
RT_FALSE | Relation does not hold.
RT_MAYBE | Relation may hold or not.
RT_TRUE | Relation does hold.

Definition at line 1734 of file view.hpp.

## BoolTest

enum Gecode::Int::BoolTest

Boolean tests.

Enumerator
BT_NONE | No sharing.
BT_SAME | Same variable.
BT_COMP | Same variable but complement.

Definition at line 1784 of file view.hpp.

## Function Documentation

## ceil_div_pp()

template<class IntType>

IntType Gecode::Int::ceil_div_pp | ( | IntType | x,
|  | IntType | y )

inline

Compute where x and y are non-negative.

Definition at line 38 of file div.hpp.

## floor_div_pp()

template<class IntType>

IntType Gecode::Int::floor_div_pp | ( | IntType | x,
|  | IntType | y )

inline

Compute where x and y are non-negative.

Definition at line 49 of file div.hpp.

## ceil_div_px()

template<class IntType>

IntType Gecode::Int::ceil_div_px | ( | IntType | x,
|  | IntType | y )

inline

Compute where x is non-negative.

Definition at line 56 of file div.hpp.

## floor_div_px()

template<class IntType>

IntType Gecode::Int::floor_div_px | ( | IntType | x,
|  | IntType | y )

inline

Compute where x is non-negative.

Definition at line 62 of file div.hpp.

## ceil_div_xp()

template<class IntType>

IntType Gecode::Int::ceil_div_xp | ( | IntType | x,
|  | IntType | y )

inline

Compute where y is non-negative.

Definition at line 69 of file div.hpp.

## floor_div_xp()

template<class IntType>

IntType Gecode::Int::floor_div_xp | ( | IntType | x,
|  | IntType | y )

inline

Compute where y is non-negative.

Definition at line 75 of file div.hpp.

## ceil_div_xx()

template<class IntType>

IntType Gecode::Int::ceil_div_xx | ( | IntType | x,
|  | IntType | y )

inline

Compute .

Definition at line 82 of file div.hpp.

## floor_div_xx()

template<class IntType>

IntType Gecode::Int::floor_div_xx | ( | IntType | x,
|  | IntType | y )

inline

Compute .

Definition at line 87 of file div.hpp.

## operator<<() [1/25]

template<class Char, class Traits, class View>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const IdxViewArray< View > & | x )

related

Definition at line 153 of file idx-view.hpp.

## sort() [1/3]

template<class TaskView, SortTaskOrder sto, bool inc>

void Gecode::Int::sort | ( | TaskViewArray< TaskView > & | t | ) |

inline

Sort task view array t according to sto and inc (increasing or decreasing).

Definition at line 133 of file sort.hpp.

## sort() [2/3]

template<class TaskView, SortTaskOrder sto, bool inc>

void Gecode::Int::sort | ( | int * | map,
|  | const TaskViewArray< TaskView > & | t )

inline

Initialize and sort map for task view array t according to sto and inc (increasing or decreasing).

Definition at line 162 of file sort.hpp.

## sort() [3/3]

template<class TaskView, SortTaskOrder sto, bool inc>

void Gecode::Int::sort | ( | int * | map,
|  | int | n,
|  | const TaskViewArray< TaskView > & | t )

inline

Sort map with size n for task view array t according to sto and inc (increasing or decreasing).

Definition at line 197 of file sort.hpp.

## plus() [1/3]

int Gecode::Int::plus | ( | int | x,
|  | int | y )

inline

Safe addition in case x is -Int::Limits::infinity.

Definition at line 39 of file tree.hpp.

## plus() [2/3]

long long int Gecode::Int::plus | ( | long long int | x,
|  | long long int | y )

inline

Safe addition in case x is -Int::Limits::llinfinity.

Definition at line 45 of file tree.hpp.

## plus() [3/3]

double Gecode::Int::plus | ( | double | x,
|  | double | y )

Safe addition in case x is -Int::Limits::double_infinity.

## purge() [1/2]

template<class OptTask, class PL>

ExecStatus Gecode::Int::purge | ( | Space & | home,
|  | Propagator & | p,
|  | TaskArray< OptTask > & | t )

Purge optional tasks that are excluded and possibly rewrite propagator.

Definition at line 38 of file purge.hpp.

## purge() [2/2]

template<class OptTask, class PL, class Cap>

ExecStatus Gecode::Int::purge | ( | Space & | home,
|  | Propagator & | p,
|  | TaskArray< OptTask > & | t,
|  | Cap | c )

Purge optional tasks that are excluded and possibly rewrite propagator.

Definition at line 51 of file purge.hpp.

## operator<<() [2/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const Event & | e )

inline

Print event e on stream os.

Definition at line 54 of file event.hpp.

## operator<<() [3/25]

template<class Char, class Traits, class Task>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const TaskArray< Task > & | t )

related

Definition at line 108 of file array.hpp.

## operator<<() [4/25]

template<class Char, class Traits, class TaskView>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const TaskViewArray< TaskView > & | t )

related

Definition at line 159 of file array.hpp.

## rtest_eq_bnd() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_eq_bnd | ( | VX | x,
|  | VY | y )

inline

Test whether views x and y are equal (use bounds information).

Definition at line 43 of file rel-test.hpp.

## rtest_eq_dom() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_eq_dom | ( | VX | x,
|  | VY | y )

inline

Test whether views x and y are equal (use full domain information).

Definition at line 65 of file rel-test.hpp.

## rtest_eq_bnd() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_eq_bnd | ( | VX | x,
|  | int | n )

inline

Test whether view x and integer n are equal (use bounds information).

Definition at line 74 of file rel-test.hpp.

## rtest_eq_dom() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_eq_dom | ( | VX | x,
|  | int | n )

inline

Test whether view x and integer n are equal (use full domain information).

Definition at line 89 of file rel-test.hpp.

## rtest_nq_bnd() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_nq_bnd | ( | VX | x,
|  | VY | y )

inline

Test whether views x and y are different (use bounds information).

Definition at line 104 of file rel-test.hpp.

## rtest_nq_dom() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_nq_dom | ( | VX | x,
|  | VY | y )

inline

Test whether views x and y are different (use full domain information).

Definition at line 126 of file rel-test.hpp.

## rtest_nq_bnd() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_nq_bnd | ( | VX | x,
|  | int | n )

inline

Test whether view x and integer n are different (use bounds information).

Definition at line 135 of file rel-test.hpp.

## rtest_nq_dom() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_nq_dom | ( | VX | x,
|  | int | n )

inline

Test whether view x and integer n are different (use full domain information).

Definition at line 150 of file rel-test.hpp.

## rtest_lq() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_lq | ( | VX | x,
|  | VY | y )

inline

Test whether view x is less or equal than view y.

Definition at line 164 of file rel-test.hpp.

## rtest_lq() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_lq | ( | VX | x,
|  | int | n )

inline

Test whether view x is less or equal than integer n.

Definition at line 172 of file rel-test.hpp.

## rtest_le() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_le | ( | VX | x,
|  | VY | y )

inline

Test whether view x is less than view y.

Definition at line 180 of file rel-test.hpp.

## rtest_le() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_le | ( | VX | x,
|  | int | n )

inline

Test whether view x is less than integer n.

Definition at line 188 of file rel-test.hpp.

## rtest_gq() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_gq | ( | VX | x,
|  | VY | y )

inline

Test whether view x is greater or equal than view y.

Definition at line 196 of file rel-test.hpp.

## rtest_gq() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_gq | ( | VX | x,
|  | int | n )

inline

Test whether view x is greater or equal than integer n.

Definition at line 204 of file rel-test.hpp.

## rtest_gr() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_gr | ( | VX | x,
|  | VY | y )

inline

Test whether view x is greater than view y.

Definition at line 212 of file rel-test.hpp.

## rtest_gr() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_gr | ( | VX | x,
|  | int | n )

inline

Test whether view x is greater than integer n.

Definition at line 220 of file rel-test.hpp.

## bool_test() [1/8]

BoolTest Gecode::Int::bool_test | ( | const BoolView & | b0,
|  | const BoolView & | b1 )

related

Definition at line 41 of file bool-test.hpp.

## bool_test() [2/8]

BoolTest Gecode::Int::bool_test | ( | const BoolView & | b0,
|  | const NegBoolView & | b1 )

related

Definition at line 45 of file bool-test.hpp.

## bool_test() [3/8]

BoolTest Gecode::Int::bool_test | ( | const NegBoolView & | b0,
|  | const BoolView & | b1 )

related

Definition at line 49 of file bool-test.hpp.

## bool_test() [4/8]

BoolTest Gecode::Int::bool_test | ( | const NegBoolView & | b0,
|  | const NegBoolView & | b1 )

related

Definition at line 53 of file bool-test.hpp.

## operator==() [1/13]

template<class View>

bool Gecode::Int::operator== | ( | const CachedView< View > & | x,
|  | const CachedView< View > & | y )

related

Definition at line 401 of file cached.hpp.

## operator!=() [1/13]

template<class View>

bool Gecode::Int::operator!= | ( | const CachedView< View > & | x,
|  | const CachedView< View > & | y )

related

Definition at line 406 of file cached.hpp.

## operator==() [2/13]

bool Gecode::Int::operator== | ( | const ConstIntView & | x,
|  | const ConstIntView & | y )

related

Definition at line 323 of file constint.hpp.

## operator!=() [2/13]

bool Gecode::Int::operator!= | ( | const ConstIntView & | x,
|  | const ConstIntView & | y )

related

Definition at line 327 of file constint.hpp.

## operator==() [3/13]

bool Gecode::Int::operator== | ( | const MinusView & | x,
|  | const MinusView & | y )

related

Definition at line 317 of file minus.hpp.

## operator!=() [3/13]

bool Gecode::Int::operator!= | ( | const MinusView & | x,
|  | const MinusView & | y )

related

Definition at line 321 of file minus.hpp.

## operator==() [4/13]

bool Gecode::Int::operator== | ( | const NegBoolView & | x,
|  | const NegBoolView & | y )

related

Definition at line 211 of file neg-bool.hpp.

## operator!=() [4/13]

bool Gecode::Int::operator!= | ( | const NegBoolView & | x,
|  | const NegBoolView & | y )

related

Definition at line 215 of file neg-bool.hpp.

## operator==() [5/13]

bool Gecode::Int::operator== | ( | const OffsetView & | x,
|  | const OffsetView & | y )

related

Definition at line 318 of file offset.hpp.

## operator!=() [5/13]

bool Gecode::Int::operator!= | ( | const OffsetView & | x,
|  | const OffsetView & | y )

related

Definition at line 322 of file offset.hpp.

## print_view()

template<class Char, class Traits, class View>

std::basic_ostream< Char, Traits > & Gecode::Int::print_view | ( | std::basic_ostream< Char, Traits > & | os,
|  | const View & | x )

Definition at line 40 of file print.hpp.

## print_scale()

template<class Char, class Traits, class Val, class UnsVal>

std::basic_ostream< Char, Traits > & Gecode::Int::print_scale | ( | std::basic_ostream< Char, Traits > & | os,
|  | const ScaleView< Val, UnsVal > & | x )

Definition at line 67 of file print.hpp.

## operator<<() [5/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const IntView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [6/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const MinusView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [7/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const OffsetView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [8/25]

template<class Char, class Traits, class View>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const CachedView< View > & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [9/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const IntScaleView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [10/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const LLongScaleView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [11/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const ConstIntView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [12/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const ZeroIntView & | )

inline

Definition at line 67 of file print.hpp.

## operator<<() [13/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const BoolView & | x )

related

Definition at line 67 of file print.hpp.

## operator<<() [14/25]

template<class Char, class Traits>

std::basic_ostream< Char, Traits > & Gecode::Int::operator<< | ( | std::basic_ostream< Char, Traits > & | os,
|  | const NegBoolView & | x )

related

Definition at line 67 of file print.hpp.

## rtest_eq_dom_check() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_eq_dom_check | ( | VX | x,
|  | VY | y )

Definition at line 50 of file rel-test.hpp.

## rtest_eq_dom_check() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_eq_dom_check | ( | VX | x,
|  | int | n )

Definition at line 81 of file rel-test.hpp.

## rtest_nq_dom_check() [1/2]

template<class VX, class VY>

RelTest Gecode::Int::rtest_nq_dom_check | ( | VX | x,
|  | VY | y )

inline

Definition at line 111 of file rel-test.hpp.

## rtest_nq_dom_check() [2/2]

template<class VX>

RelTest Gecode::Int::rtest_nq_dom_check | ( | VX | x,
|  | int | n )

inline

Definition at line 142 of file rel-test.hpp.

## operator==() [6/13]

template<class Val, class UnsVal>

bool Gecode::Int::operator== | ( | const ScaleView< Val, UnsVal > & | x,
|  | const ScaleView< Val, UnsVal > & | y )

related

Definition at line 325 of file scale.hpp.

## operator!=() [6/13]

template<class Val, class UnsVal>

bool Gecode::Int::operator!= | ( | const ScaleView< Val, UnsVal > & | x,
|  | const ScaleView< Val, UnsVal > & | y )

related

Definition at line 330 of file scale.hpp.

## operator==() [7/13]

bool Gecode::Int::operator== | ( | const ZeroIntView & | ,
|  | const ZeroIntView & | )

related

Definition at line 298 of file zero.hpp.

## operator!=() [7/13]

bool Gecode::Int::operator!= | ( | const ZeroIntView & | ,
|  | const ZeroIntView & | )

related

Definition at line 302 of file zero.hpp.

## Variable Documentation

## ME_INT_FAILED

const Gecode::ModEvent Gecode::Int::ME_INT_FAILED = Gecode::ME_GEN_FAILED

Domain operation has resulted in failure.

Definition at line 52 of file var-type.hpp.

## ME_INT_NONE

const Gecode::ModEvent Gecode::Int::ME_INT_NONE = Gecode::ME_GEN_NONE

Domain operation has not changed domain.

Definition at line 54 of file var-type.hpp.

## ME_INT_VAL

const Gecode::ModEvent Gecode::Int::ME_INT_VAL = Gecode::ME_GEN_ASSIGNED

Domain operation has resulted in a value (assigned variable).

Definition at line 56 of file var-type.hpp.

## ME_INT_BND

const Gecode::ModEvent Gecode::Int::ME_INT_BND = Gecode::ME_GEN_ASSIGNED + 1

Domain operation has changed the minimum or maximum of the domain.

Note that this implies that the domain has not resulted in a value.

If a propagator subscribes to this variable, it will be processed assuming a ME_INT_BND modification event.

Definition at line 65 of file var-type.hpp.

## ME_INT_DOM

const Gecode::ModEvent Gecode::Int::ME_INT_DOM = Gecode::ME_GEN_ASSIGNED + 2

Domain operation has changed the domain.

Note that this implies that the domain has not resulted in a value and that also the minimum and maximum of the domain have not changed.

Definition at line 72 of file var-type.hpp.

## PC_INT_NONE

const Gecode::PropCond Gecode::Int::PC_INT_NONE = Gecode::PC_GEN_NONE

Propagation condition to be ignored (convenience).

Definition at line 74 of file var-type.hpp.

## PC_INT_VAL

const Gecode::PropCond Gecode::Int::PC_INT_VAL = Gecode::PC_GEN_ASSIGNED

Propagate when a view becomes assigned (single value).

If a propagator p depends on a view x with propagation condition PC_INT_VAL, then p is propagated when a domain update operation on x returns the modification event ME_INT_VAL.

Definition at line 82 of file var-type.hpp.

## PC_INT_BND

const Gecode::PropCond Gecode::Int::PC_INT_BND = Gecode::PC_GEN_ASSIGNED + 1

Propagate when minimum or maximum of a view changes.

If a propagator p depends on a view x with propagation condition PC_INT_BND, then p is propagated when a domain update operation on x returns the modification events ME_INT_VAL or ME_INT_BND.

Definition at line 91 of file var-type.hpp.

## PC_INT_DOM

const Gecode::PropCond Gecode::Int::PC_INT_DOM = Gecode::PC_GEN_ASSIGNED + 2

Propagate when domain changes.

If a propagator p depends on a view x with propagation condition PC_INT_DOM, then p is propagated when a domain update operation on x returns the modification event ME_INT_VAL, ME_INT_BND, or ME_INT_DOM.

Definition at line 100 of file var-type.hpp.

## ME_BOOL_FAILED

const Gecode::ModEvent Gecode::Int::ME_BOOL_FAILED = Gecode::ME_GEN_FAILED

Domain operation has resulted in failure.

Definition at line 112 of file var-type.hpp.

## ME_BOOL_NONE

const Gecode::ModEvent Gecode::Int::ME_BOOL_NONE = Gecode::ME_GEN_NONE

Domain operation has not changed domain.

Definition at line 114 of file var-type.hpp.

## ME_BOOL_VAL

const Gecode::ModEvent Gecode::Int::ME_BOOL_VAL = Gecode::ME_GEN_ASSIGNED

Domain operation has resulted in a value (assigned variable).

Definition at line 116 of file var-type.hpp.

## PC_BOOL_NONE

const Gecode::PropCond Gecode::Int::PC_BOOL_NONE = Gecode::PC_GEN_NONE

Propagation condition to be ignored (convenience).

Definition at line 118 of file var-type.hpp.

## PC_BOOL_VAL

const Gecode::PropCond Gecode::Int::PC_BOOL_VAL = Gecode::PC_GEN_ASSIGNED

Propagate when a view becomes assigned (single value).

If a propagator p depends on a view x with propagation condition PC_BOOL_VAL, then p is propagated when a domain update operation on x returns the modification event ME_BOOL_VAL.

Definition at line 126 of file var-type.hpp.