Generated on Sat Jul 29 2017 12:41:24 for Gecode by doxygen 1.8.13
Gecode::ViewValBrancher< View, n, Val, a, Filter, Print > Class Template Reference

Generic brancher by view and value selection. More...

#include <brancher-view-val.hpp>

Public Member Functions

virtual const Choicechoice (Space &home)
 Return choice. More...
 
virtual const Choicechoice (const Space &home, Archive &e)
 Return choice. More...
 
virtual ExecStatus commit (Space &home, const Choice &c, unsigned int b)
 Perform commit for choice c and alternative b. More...
 
virtual NGLngl (Space &home, const Choice &c, unsigned int b) const
 Create no-good literal for choice c and alternative b. More...
 
virtual void print (const Space &home, const Choice &c, unsigned int b, std::ostream &o) const
 Print branch for choice c and alternative b. More...
 
virtual Actorcopy (Space &home, bool share)
 Perform cloning. More...
 
virtual size_t dispose (Space &home)
 Delete brancher and return its size. More...
 
- Public Member Functions inherited from Gecode::ViewBrancher< View, Filter, n >
virtual bool status (const Space &home) const
 Check status of brancher, return true if alternatives left. More...
 
- Public Member Functions inherited from Gecode::Brancher
unsigned int id (void) const
 Return brancher id. More...
 
BrancherGroup group (void) const
 Return group brancher belongs to. More...
 
void group (BrancherGroup g)
 Add brancher to group g. More...
 
- Public Member Functions inherited from Gecode::Actor
virtual ~Actor (void)
 To avoid warnings. More...
 

Static Public Member Functions

static void post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp)
 Brancher post function. More...
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s)
 Not used. More...
 
static void operator delete (void *p)
 Not used. More...
 
static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 No-op for exceptions. More...
 

Protected Types

typedef View::VarType Var
 The corresponding variable. More...
 
- Protected Types inherited from Gecode::ViewBrancher< View, Filter, n >
typedef View::VarType Var
 The corresponding variable. More...
 

Protected Member Functions

 ViewValBrancher (Space &home, bool share, ViewValBrancher &b)
 Constructor for cloning b. More...
 
 ViewValBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp)
 Constructor for creation. More...
 
- Protected Member Functions inherited from Gecode::ViewBrancher< View, Filter, n >
Pos pos (Space &home)
 Return position information. More...
 
View view (const Pos &p) const
 Return view according to position information p. More...
 
 ViewBrancher (Space &home, bool shared, ViewBrancher< View, Filter, n > &b)
 Constructor for cloning b. More...
 
 ViewBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], BranchFilter< Var > bf)
 Constructor for creation. More...
 
- Protected Member Functions inherited from Gecode::Brancher
 Brancher (Home home)
 Constructor for creation. More...
 
 Brancher (Space &home, bool share, Brancher &b)
 Constructor for cloning b. More...
 

Protected Attributes

ValSelCommitBase< View, Val > * vsc
 Value selection and commit object. More...
 
Print p
 Print function. More...
 
- Protected Attributes inherited from Gecode::ViewBrancher< View, Filter, n >
ViewArray< View > x
 Views to branch on. More...
 
int start
 Unassigned views start at x[start]. More...
 
ViewSel< View > * vs [n]
 View selection objects. More...
 
Filter f
 Filter function. More...
 

Detailed Description

template<class View, int n, class Val, unsigned int a, class Filter, class Print>
class Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >

Generic brancher by view and value selection.

Implements view-based branching for an array of views (of type View) and value (of type Val).

Definition at line 98 of file brancher-view-val.hpp.

Member Typedef Documentation

◆ Var

template<class View, int n, class Val, unsigned int a, class Filter, class Print>
typedef View::VarType Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::Var
protected

The corresponding variable.

Definition at line 104 of file brancher-view-val.hpp.

Constructor & Destructor Documentation

◆ ViewValBrancher() [1/2]

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::ViewValBrancher ( Space home,
bool  share,
ViewValBrancher< View, n, Val, a, Filter, Print > &  b 
)
inlineprotected

Constructor for cloning b.

Definition at line 268 of file brancher-view-val.hpp.

◆ ViewValBrancher() [2/2]

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::ViewValBrancher ( Home  home,
ViewArray< View > &  x,
ViewSel< View > *  vs[n],
ValSelCommitBase< View, Val > *  vsc,
BranchFilter< Var bf,
VarValPrint< Var, Val >  vvp 
)
inlineprotected

Constructor for creation.

Definition at line 241 of file brancher-view-val.hpp.

Member Function Documentation

◆ choice() [1/2]

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
const Choice * Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::choice ( Space home)
virtual

◆ choice() [2/2]

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
const Choice * Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::choice ( const Space home,
Archive e 
)
virtual

Return choice.

Implements Gecode::Brancher.

Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >.

Definition at line 293 of file brancher-view-val.hpp.

◆ commit()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
ExecStatus Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::commit ( Space home,
const Choice c,
unsigned int  b 
)
virtual

Perform commit for choice c and alternative b.

Implements Gecode::Brancher.

Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >, and Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a, Filter, Print >.

Definition at line 305 of file brancher-view-val.hpp.

◆ ngl()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
NGL * Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::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 319 of file brancher-view-val.hpp.

◆ print()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
void Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::print ( const Space home,
const Choice c,
unsigned int  b,
std::ostream &  o 
) const
virtual

Print branch for choice c and alternative b.

Prints an explanation of the alternative b of choice c on the stream o.

Reimplemented from Gecode::Brancher.

Definition at line 330 of file brancher-view-val.hpp.

◆ copy()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
Actor * Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::copy ( Space home,
bool  share 
)
virtual

◆ dispose()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
size_t Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::dispose ( Space home)
inlinevirtual

Delete brancher and return its size.

Reimplemented from Gecode::ViewBrancher< View, Filter, n >.

Reimplemented in Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a, Filter, Print >.

Definition at line 344 of file brancher-view-val.hpp.

◆ post()

template<class View , int n, class Val , unsigned int a, class Filter , class Print >
void Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::post ( Home  home,
ViewArray< View > &  x,
ViewSel< View > *  vs[n],
ValSelCommitBase< View, Val > *  vsc,
BranchFilter< Var bf,
VarValPrint< Var, Val >  vvp 
)
inlinestatic

Brancher post function.

Definition at line 256 of file brancher-view-val.hpp.

Member Data Documentation

◆ vsc

template<class View, int n, class Val, unsigned int a, class Filter, class Print>
ValSelCommitBase<View,Val>* Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::vsc
protected

Value selection and commit object.

Definition at line 106 of file brancher-view-val.hpp.

◆ p

template<class View, int n, class Val, unsigned int a, class Filter, class Print>
Print Gecode::ViewValBrancher< View, n, Val, a, Filter, Print >::p
protected

Print function.

Definition at line 108 of file brancher-view-val.hpp.


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