Gecode::FlatZinc::IntBoolBrancherBase Class Referenceabstract

Base-class for brancher for integer and Boolean views. More...

`#include <branch.hh>`

## Public Member Functions

virtual bool | status (const Space &home) const
| Check status of brancher, return true if alternatives left.
virtual const Choice * | choice (Space &home)=0
| Return choice.
virtual const Choice * | choice (const Space &home, Archive &e)
| Return choice.
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int b)
| Perform commit for choice c and alternative b.
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int b) const
| Create no-good literal for choice c and alternative b.
virtual void | print (const Space &home, const Choice &c, unsigned int b, std::ostream &o) const
| Print branch for choice c and alternative b.
virtual size_t | dispose (Space &home)
| Delete brancher and return its size.
unsigned int | id (void) const
| Return brancher id.
BrancherGroup | group (void) const
| Return group brancher belongs to.
void | group (BrancherGroup g)
| Add brancher to group g.
Public Member Functions inherited from Gecode::Actor
virtual Actor * | copy (Space &home)=0
| Create copy.
virtual | ~Actor (void)
| To avoid warnings.

## Protected Member Functions

| IntBoolBrancherBase (Space &home, IntBoolBrancherBase &b)
| Constructor for cloning b.
| IntBoolBrancherBase (Home home, ViewArray< Int::IntView > x, ViewArray< Int::BoolView > y, ValSelCommitBase< Int::IntView, int > *xvsc, ValSelCommitBase< Int::BoolView, int > *yvsc)
| Constructor for creation.
Protected Member Functions inherited from Gecode::Brancher
| Brancher (Home home)
| Constructor for creation.
| Brancher (Space &home, Brancher &b)
| Constructor for cloning b.

## Protected Attributes

ViewArray< Int::IntView > | x
| Integer views to branch on.
ViewArray< Int::BoolView > | y
| Boolean views to branch on.
int | start
| Unassigned views start here (might be in x or y).
ValSelCommitBase< Int::IntView, int > * | xvsc
| Integer value selection and commit object.
ValSelCommitBase< Int::BoolView, int > * | yvsc
| Boolean value selection and commit object.

## Additional Inherited Members

static void * | operator new (size_t s, Space &home)
| Allocate memory from space.
static void | operator delete (void *p, Space &home)
| No-op for exceptions.
static void * | operator new (size_t s)
| Not used.
static void | operator delete (void *p)
| Not used.

## Detailed Description

Base-class for brancher for integer and Boolean views.

Definition at line 264 of file branch.hh.

## Constructor & Destructor Documentation

## IntBoolBrancherBase() [1/2]

Gecode::FlatZinc::IntBoolBrancherBase::IntBoolBrancherBase | ( | Space & | home,
|  | IntBoolBrancherBase & | b )

inline protected

Constructor for cloning b.

Definition at line 315 of file branch.hpp.

## IntBoolBrancherBase() [2/2]

Gecode::FlatZinc::IntBoolBrancherBase::IntBoolBrancherBase | ( | Home | home,
|  | ViewArray< Int::IntView > | x,
|  | ViewArray< Int::BoolView > | y,
|  | ValSelCommitBase< Int::IntView, int > * | xvsc,
|  | ValSelCommitBase< Int::BoolView, int > * | yvsc )

inline protected

Constructor for creation.

Definition at line 304 of file branch.hpp.

## Member Function Documentation

## status()

bool Gecode::FlatZinc::IntBoolBrancherBase::status | ( | const Space & | home | ) | const

virtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 48 of file branch.cpp.

## choice() [1/2]

virtual const Choice * Gecode::FlatZinc::IntBoolBrancherBase::choice | ( | Space & | home | ) |

pure virtual

Return choice.

Implements Gecode::Brancher.

Implemented in Gecode::FlatZinc::IntBoolBrancher< Merit >.

## choice() [2/2]

const Choice * Gecode::FlatZinc::IntBoolBrancherBase::choice | ( | const Space & | home,
|  | Archive & | e )

virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 111 of file branch.cpp.

## commit()

ExecStatus Gecode::FlatZinc::IntBoolBrancherBase::commit | ( | Space & | home,
|  | const Choice & | c,
|  | unsigned int | b )

virtual

Perform commit for choice c and alternative b.

Implements Gecode::Brancher.

Definition at line 66 of file branch.cpp.

## ngl()

NGL * Gecode::FlatZinc::IntBoolBrancherBase::ngl | ( | Space & | home,
|  | const Choice & | c,
|  | unsigned int | b ) const

virtual

Create no-good literal for choice c and alternative b.

Reimplemented from Gecode::Brancher.

Definition at line 82 of file branch.cpp.

## print()

void Gecode::FlatZinc::IntBoolBrancherBase::print | ( | const Space & | home,
|  | const Choice & | c,
|  | unsigned int | b,
|  | std::ostream & | o ) const

virtual

Print branch for choice c and alternative b.

Reimplemented from Gecode::Brancher.

Definition at line 96 of file branch.cpp.

## dispose()

size_t Gecode::FlatZinc::IntBoolBrancherBase::dispose | ( | Space & | home | ) |

inline virtual

Delete brancher and return its size.

Reimplemented from Gecode::Actor.

Reimplemented in Gecode::FlatZinc::IntBoolBrancher< Merit >.

Definition at line 324 of file branch.hpp.

## Member Data Documentation

## x

ViewArray<Int::IntView> Gecode::FlatZinc::IntBoolBrancherBase::x

protected

Integer views to branch on.

Definition at line 267 of file branch.hh.

## y

ViewArray<Int::BoolView> Gecode::FlatZinc::IntBoolBrancherBase::y

protected

Boolean views to branch on.

Definition at line 269 of file branch.hh.

## start

int Gecode::FlatZinc::IntBoolBrancherBase::start

mutable protected

Unassigned views start here (might be in x or y).

Definition at line 271 of file branch.hh.

## xvsc

ValSelCommitBase<Int::IntView,int>* Gecode::FlatZinc::IntBoolBrancherBase::xvsc

protected

Integer value selection and commit object.

Definition at line 273 of file branch.hh.

## yvsc

ValSelCommitBase<Int::BoolView,int>* Gecode::FlatZinc::IntBoolBrancherBase::yvsc

protected

Boolean value selection and commit object.

Definition at line 275 of file branch.hh.

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

- gecode/flatzinc/branch.hh
- gecode/flatzinc/branch.cpp
- gecode/flatzinc/branch.hpp