Gecode::ViewBrancher< View, Filter, n > Class Template Reference

Generic brancher by view selection. More...

`#include <view.hpp>`

## Public Member Functions

virtual bool | status (const Space &home) const
| Check status of brancher, return true if alternatives left.
virtual size_t | dispose (Space &home)
| Delete brancher and return its size.
virtual const Choice * | choice (Space &home)=0
| Return choice.
virtual const Choice * | choice (const Space &home, Archive &e)=0
| Return choice from e.
virtual ExecStatus | commit (Space &home, const Choice &c, unsigned int a)=0
| Commit for choice c and alternative a.
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int a) const
| Create no-good literal for choice c and alternative a.
virtual void | print (const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
| Print branch for choice c and alternative a.
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 Types

typedef View::VarType | Var
| The corresponding variable.

## Protected Member Functions

Pos | pos (Space &home)
| Return position information.
View | view (const Pos &p) const
| Return view according to position information p.
| ViewBrancher (Space &home, ViewBrancher< View, Filter, n > &b)
| Constructor for cloning b.
| ViewBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], BranchFilter< Var > bf)
| 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< View > | x
| Views to branch on.
int | start
| Unassigned views start at x[start].
ViewSel< View > * | vs [n]
| View selection objects.
Filter | f
| Filter function.

## 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

template<class View, class Filter, int n>
class Gecode::ViewBrancher< View, Filter, n >

Generic brancher by view selection.

Defined for views of type View and n view selectors for tie-breaking.

Definition at line 78 of file view.hpp.

## Member Typedef Documentation

## Var

template<class View, class Filter, int n>

typedef View::VarType Gecode::ViewBrancher< View, Filter, n >::Var

protected

The corresponding variable.

Definition at line 81 of file view.hpp.

## Constructor & Destructor Documentation

## ViewBrancher() [1/2]

template<class View, class Filter, int n>

Gecode::ViewBrancher< View, Filter, n >::ViewBrancher | ( | Space & | home,
|  | ViewBrancher< View, Filter, n > & | b )

inline protected

Constructor for cloning b.

Definition at line 152 of file view.hpp.

## ViewBrancher() [2/2]

template<class View, class Filter, int n>

Gecode::ViewBrancher< View, Filter, n >::ViewBrancher | ( | Home | home,
|  | ViewArray< View > & | x,
|  | ViewSel< View > * | vs[n],
|  | BranchFilter< Var > | bf )

inline protected

Constructor for creation.

Definition at line 137 of file view.hpp.

## Member Function Documentation

## pos()

template<class View, class Filter, int n>

Pos Gecode::ViewBrancher< View, Filter, n >::pos | ( | Space & | home | ) |

inline protected

Return position information.

Definition at line 173 of file view.hpp.

## view()

template<class View, class Filter, int n>

View Gecode::ViewBrancher< View, Filter, n >::view | ( | const Pos & | p | ) | const

inline protected

Return view according to position information p.

Definition at line 213 of file view.hpp.

## status()

template<class View, class Filter, int n>

bool Gecode::ViewBrancher< View, Filter, n >::status | ( | const Space & | home | ) | const

virtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 162 of file view.hpp.

## dispose()

template<class View, class Filter, int n>

size_t Gecode::ViewBrancher< View, Filter, n >::dispose | ( | Space & | home | ) |

inline virtual

Delete brancher and return its size.

Reimplemented from Gecode::Actor.

Reimplemented in Gecode::Int::Branch::ViewValuesBrancher< n, min, Filter, Print >, Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >, and Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >.

Definition at line 219 of file view.hpp.

## Member Data Documentation

## x

template<class View, class Filter, int n>

ViewArray<View> Gecode::ViewBrancher< View, Filter, n >::x

protected

Views to branch on.

Definition at line 83 of file view.hpp.

## start

template<class View, class Filter, int n>

int Gecode::ViewBrancher< View, Filter, n >::start

mutable protected

Unassigned views start at x[start].

Definition at line 85 of file view.hpp.

## vs

template<class View, class Filter, int n>

ViewSel<View>* Gecode::ViewBrancher< View, Filter, n >::vs[n]

protected

View selection objects.

Definition at line 87 of file view.hpp.

## f

template<class View, class Filter, int n>

Filter Gecode::ViewBrancher< View, Filter, n >::f

protected

Filter function.

Definition at line 89 of file view.hpp.

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

- gecode/kernel/branch/view.hpp