Generated on Wed Nov 1 15:05:13 2006 for Gecode by doxygen 1.4.5

Gecode::ViewValBranching< View, Val, ViewSel, ValSel > Class Template Reference
[Generic branching based on view and value selection]

Inherits Gecode::Branching.

List of all members.


Detailed Description

template<class View, class Val, class ViewSel, class ValSel>
class Gecode::ViewValBranching< View, Val, ViewSel, ValSel >

Generic branching.

Implements view-based branching for an array of views (of type View) and value (of type Val). The behaviour is defined by the class ViewSel (which view is selected for branching) and the class ValSel (which value is selected for branching).

The class ViewSel must implement two member functions:

The class VarSel must implement two member functions:

For examples, see integer branchings .

Definition at line 68 of file branching.icc.

Public Member Functions

 ViewValBranching (Space *home, ViewArray< View > &x)
 Constructor for creation.
virtual bool status (const Space *home) const
 Check status of branching, return true if alternatives left.
virtual const BranchingDescdescription (const Space *home) const
 Return branching description (of type Gecode::PosValDesc).
virtual ExecStatus commit (Space *home, const BranchingDesc *d, unsigned int a)
 Perform commit for branching description d and alternative a.
virtual Actorcopy (Space *home, bool share)
 Perform cloning.

Protected Member Functions

 ViewValBranching (Space *home, bool share, ViewValBranching &b)
 Constructor for cloning b.

Protected Attributes

ViewArray< View > x
 Views to branch on.
int start
 Unassigned views start at x[start].


Constructor & Destructor Documentation

template<class View, class Val, class ViewSel, class ValSel>
Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::ViewValBranching Space home,
bool  share,
ViewValBranching< View, Val, ViewSel, ValSel > &  b
[inline, protected]
 

Constructor for cloning b.

Definition at line 173 of file branching.icc.

template<class View, class Val, class ViewSel, class ValSel>
Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::ViewValBranching Space home,
ViewArray< View > &  x
[inline]
 

Constructor for creation.

Definition at line 166 of file branching.icc.


Member Function Documentation

template<class View, class Val, class ViewSel, class ValSel>
bool Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::status const Space home  )  const [virtual]
 

Check status of branching, return true if alternatives left.

Implements Gecode::Branching.

Definition at line 188 of file branching.icc.

template<class View, class Val, class ViewSel, class ValSel>
const BranchingDesc * Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::description const Space home  )  const [virtual]
 

Return branching description (of type Gecode::PosValDesc).

Implements Gecode::Branching.

Definition at line 200 of file branching.icc.

template<class View, class Val, class ViewSel, class ValSel>
ExecStatus Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::commit Space home,
const BranchingDesc d,
unsigned int  a
[virtual]
 

Perform commit for branching description d and alternative a.

Implements Gecode::Branching.

Definition at line 222 of file branching.icc.

template<class View, class Val, class ViewSel, class ValSel>
Actor * Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::copy Space home,
bool  share
[virtual]
 

Perform cloning.

Implements Gecode::Actor.

Definition at line 180 of file branching.icc.


Member Data Documentation

template<class View, class Val, class ViewSel, class ValSel>
ViewArray<View> Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::x [protected]
 

Views to branch on.

Definition at line 70 of file branching.icc.

template<class View, class Val, class ViewSel, class ValSel>
int Gecode::ViewValBranching< View, Val, ViewSel, ValSel >::start [mutable, protected]
 

Unassigned views start at x[start].

Definition at line 71 of file branching.icc.


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