Gecode::Int::NegBoolView Class Reference
Functionality by programming task » Programming actors » Programming integer actors » Integer views

Negated Boolean view. More...

`#include <view.hpp>`

## Domain status access

static const int | BITS = BoolView::BITS
| How many bits does the status have.
static const BoolStatus | ZERO = BoolView::ONE
| Status of domain assigned to zero.
static const BoolStatus | ONE = BoolView::ZERO
| Status of domain assigned to one.
static const BoolStatus | NONE = BoolView::NONE
| Status of domain not yet assigned.
BoolStatus | status (void) const
| Return current domain status.

## Constructors and initialization

| NegBoolView (void)
| Default constructor.
| NegBoolView (const BoolView &y)
| Initialize with Boolean view y.

## Boolean domain tests

bool | zero (void) const
| Test whether view is assigned to be zero.
bool | one (void) const
| Test whether view is assigned to be one.
bool | none (void) const
| Test whether view is not yet assigned.

## Boolean assignment operations

ModEvent | one (Space &home)
| Try to assign view to one.
ModEvent | zero (Space &home)
| Try to assign view to zero.
ModEvent | one_none (Space &home)
| Assign not yet assigned view to one.
ModEvent | zero_none (Space &home)
| Assign not yet assigned view to zero.

## Domain update by value

ModEvent | lq (Space &home, int n)
| Restrict domain values to be less or equal than n.
ModEvent | lq (Space &home, long long int n)
| Restrict domain values to be less or equal than n.
ModEvent | le (Space &home, int n)
| Restrict domain values to be less than n.
ModEvent | le (Space &home, long long int n)
| Restrict domain values to be less than n.
ModEvent | gq (Space &home, int n)
| Restrict domain values to be greater or equal than n.
ModEvent | gq (Space &home, long long int n)
| Restrict domain values to be greater or equal than n.
ModEvent | gr (Space &home, int n)
| Restrict domain values to be greater than n.
ModEvent | gr (Space &home, long long int n)
| Restrict domain values to be greater than n.
ModEvent | nq (Space &home, int n)
| Restrict domain values to be different from n.
ModEvent | nq (Space &home, long long int n)
| Restrict domain values to be different from n.
ModEvent | eq (Space &home, int n)
| Restrict domain values to be equal to n.
ModEvent | eq (Space &home, long long int n)
| Restrict domain values to be equal to n.

## Value access

int | min (void) const
| Return minimum of domain.
int | max (void) const
| Return maximum of domain.
int | val (void) const
| Return assigned value (only if assigned).

## Delta information for advisors

int | min (const Delta &d) const
| Return minimum value just pruned.
int | max (const Delta &d) const
| Return maximum value just pruned.
unsigned int | width (const Delta &d) const
| Return width of values just pruned.
bool | any (const Delta &d) const
| Test whether arbitrary values got pruned.
static bool | zero (const Delta &d)
| Test whether a view has been assigned to zero.
static bool | one (const Delta &d)
| Test whether a view has been assigned to one.

## View comparison

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.

## Additional Inherited Members

Public Types inherited from Gecode::DerivedView< BoolView >
typedef BoolView::VarImpType | VarImpType
| The variable implementation type belonging to the View.
typedef BoolView::VarType | VarType
| The variable type belonging to the View.
VarImpType * | varimp (void) const
| Return variable implementation of view.
BoolView | base (void) const
| Return view from which this view is derived.
unsigned int | degree (void) const
| Return degree (number of subscribed propagators).
double | afc (void) const
| Return accumulated failure count.
bool | assigned (void) const
| Test whether view is assigned.
void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
| Subscribe propagator p with propagation condition pc to view.
void | cancel (Space &home, Propagator &p, PropCond pc)
| Cancel subscription of propagator p with propagation condition pc to view.
void | reschedule (Space &home, Propagator &p, PropCond pc)
| Re-schedule propagator p with propagation condition pc.
void | update (Space &home, DerivedView< BoolView > &y)
| Update this view to be a clone of view y.
bool | operator< (const DerivedView< BoolView > &y) const
| Whether this view comes before view y (arbitray order).
static bool | varderived (void)
| Return whether this view is derived from a VarImpView.
static void | schedule (Space &home, Propagator &p, ModEvent me)
| Schedule propagator p with modification event me.
static ModEvent | me (const ModEventDelta &med)
| Return modification event for view type in med.
static ModEventDelta | med (ModEvent)
| Translate modification event me to modification event delta for view.
static ModEvent | modevent (const Delta &d)
| Return modification event.
Protected Member Functions inherited from Gecode::DerivedView< BoolView >
| DerivedView (void)
| Default constructor.
Protected Attributes inherited from Gecode::DerivedView< BoolView >
BoolView | x
| View from which this view is derived.

## Detailed Description

Negated Boolean view.

A negated Boolean view for a Boolean view provides operations such that behaves as .

Definition at line 1574 of file view.hpp.

## Constructor & Destructor Documentation

## NegBoolView() [1/2]

Gecode::Int::NegBoolView::NegBoolView | ( | void |  | ) |

inline

Default constructor.

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

## NegBoolView() [2/2]

Gecode::Int::NegBoolView::NegBoolView | ( | const BoolView & | y | ) |

inline explicit

Initialize with Boolean view y.

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

## Member Function Documentation

## status()

BoolStatus Gecode::Int::NegBoolView::status | ( | void |  | ) | const

inline

Return current domain status.

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

## zero() [1/3]

bool Gecode::Int::NegBoolView::zero | ( | void |  | ) | const

inline

Test whether view is assigned to be zero.

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

## one() [1/3]

bool Gecode::Int::NegBoolView::one | ( | void |  | ) | const

inline

Test whether view is assigned to be one.

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

## none()

bool Gecode::Int::NegBoolView::none | ( | void |  | ) | const

inline

Test whether view is not yet assigned.

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

## one() [2/3]

ModEvent Gecode::Int::NegBoolView::one | ( | Space & | home | ) |

inline

Try to assign view to one.

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

## zero() [2/3]

ModEvent Gecode::Int::NegBoolView::zero | ( | Space & | home | ) |

inline

Try to assign view to zero.

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

## one_none()

ModEvent Gecode::Int::NegBoolView::one_none | ( | Space & | home | ) |

inline

Assign not yet assigned view to one.

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

## zero_none()

ModEvent Gecode::Int::NegBoolView::zero_none | ( | Space & | home | ) |

inline

Assign not yet assigned view to zero.

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

## lq() [1/2]

ModEvent Gecode::Int::NegBoolView::lq | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be less or equal than n.

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

## lq() [2/2]

ModEvent Gecode::Int::NegBoolView::lq | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be less or equal than n.

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

## le() [1/2]

ModEvent Gecode::Int::NegBoolView::le | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be less than n.

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

## le() [2/2]

ModEvent Gecode::Int::NegBoolView::le | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be less than n.

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

## gq() [1/2]

ModEvent Gecode::Int::NegBoolView::gq | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be greater or equal than n.

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

## gq() [2/2]

ModEvent Gecode::Int::NegBoolView::gq | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be greater or equal than n.

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

## gr() [1/2]

ModEvent Gecode::Int::NegBoolView::gr | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be greater than n.

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

## gr() [2/2]

ModEvent Gecode::Int::NegBoolView::gr | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be greater than n.

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

## nq() [1/2]

ModEvent Gecode::Int::NegBoolView::nq | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be different from n.

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

## nq() [2/2]

ModEvent Gecode::Int::NegBoolView::nq | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be different from n.

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

## eq() [1/2]

ModEvent Gecode::Int::NegBoolView::eq | ( | Space & | home,
|  | int | n )

inline

Restrict domain values to be equal to n.

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

## eq() [2/2]

ModEvent Gecode::Int::NegBoolView::eq | ( | Space & | home,
|  | long long int | n )

inline

Restrict domain values to be equal to n.

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

## min() [1/2]

int Gecode::Int::NegBoolView::min | ( | void |  | ) | const

inline

Return minimum of domain.

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

## max() [1/2]

int Gecode::Int::NegBoolView::max | ( | void |  | ) | const

inline

Return maximum of domain.

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

## val()

int Gecode::Int::NegBoolView::val | ( | void |  | ) | const

inline

Return assigned value (only if assigned).

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

## min() [2/2]

int Gecode::Int::NegBoolView::min | ( | const Delta & | d | ) | const

inline

Return minimum value just pruned.

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

## max() [2/2]

int Gecode::Int::NegBoolView::max | ( | const Delta & | d | ) | const

inline

Return maximum value just pruned.

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

## width()

unsigned int Gecode::Int::NegBoolView::width | ( | const Delta & | d | ) | const

inline

Return width of values just pruned.

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

## any()

bool Gecode::Int::NegBoolView::any | ( | const Delta & | d | ) | const

inline

Test whether arbitrary values got pruned.

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

## zero() [3/3]

bool Gecode::Int::NegBoolView::zero | ( | const Delta & | d | ) |

inline static

Test whether a view has been assigned to zero.

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

## one() [3/3]

bool Gecode::Int::NegBoolView::one | ( | const Delta & | d | ) |

inline static

Test whether a view has been assigned to one.

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

## Friends And Related Symbol Documentation

## operator==()

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

related

Test whether views x and y are the same.

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

## operator!=()

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

related

Test whether views x and y are not the same.

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

## operator<<()

template<class Char, class Traits>

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

related

Print negated Boolean view.

Definition at line 67 of file print.hpp.

## Member Data Documentation

## BITS

const int Gecode::Int::NegBoolView::BITS = BoolView::BITS

static

How many bits does the status have.

Definition at line 1589 of file view.hpp.

## ZERO

const BoolStatus Gecode::Int::NegBoolView::ZERO = BoolView::ONE

static

Status of domain assigned to zero.

Definition at line 1591 of file view.hpp.

## ONE

const BoolStatus Gecode::Int::NegBoolView::ONE = BoolView::ZERO

static

Status of domain assigned to one.

Definition at line 1593 of file view.hpp.

## NONE

const BoolStatus Gecode::Int::NegBoolView::NONE = BoolView::NONE

static

Status of domain not yet assigned.

Definition at line 1595 of file view.hpp.

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

- gecode/int/view.hpp
- gecode/int/view/neg-bool.hpp