Generated on Sat Feb 7 2015 02:01:52 for Gecode by doxygen 1.8.9.1
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a > Class Template Reference

Symmetry-breaking brancher with generic view and value selection. More...

#include <ldsb.hh>

Public Types

typedef void(* VarValPrint) (const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o)
 Function type for printing variable and value selection. More...
 

Public Member Functions

 LDSBSetBrancher (Space &home, bool share, LDSBSetBrancher &b)
 Constructor for cloning b. More...
 
 LDSBSetBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, SetBranchFilter bf, VarValPrint vvp)
 Constructor for creation. More...
 
virtual const Choicechoice (Space &home)
 Return choice. More...
 
virtual ExecStatus commit (Space &home, const Choice &c, unsigned int b)
 Perform commit for choice c and alternative b. More...
 
virtual Actorcopy (Space &home, bool share)
 Perform cloning. More...
 
void updatePart1 (Space &home, int choicePos)
 Part one of the update phase. More...
 
- Public Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >
virtual const Choicechoice (const Space &home, Archive &e)
 Return choice. More...
 
virtual size_t dispose (Space &home)
 Delete brancher and return its size. More...
 
- Public Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a >
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...
 
- Public Member Functions inherited from Gecode::ViewBrancher< View, 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 unsigned brancher id. More...
 
- Public Member Functions inherited from Gecode::Actor

Static Public Member Functions

static BrancherHandle post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **_syms, int _nsyms, SetBranchFilter bf, VarValPrint vvp)
 Brancher post function. More...
 
- Static Public Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >
static BrancherHandle post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter bf, VarValPrint vvp)
 Brancher post function. More...
 
- Static Public Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a >
static BrancherHandle post (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, BranchFilter bf, VarValPrint vvp)
 Brancher post function. More...
 
- Static Public Member Functions inherited from Gecode::Actor
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...
 

Public Attributes

int _prevPos
 Position of previous variable that was branched on. More...
 
int _nNonValueSymmetries
 Number of non-value symmetries. More...
 
int _nValueSymmetries
 Number of value symmetries. More...
 
ValueSymmetryImp< View > ** _copiedSyms
 Copy of value symmetries from the first node where the current variable was branched on. More...
 
int _nCopiedSyms
 Number of copied symmetries. More...
 
IntSet _leftBranchValues
 Set of values used on left branches for the current variable. More...
 
bool _stable
 Is the state of the brancher "stable"? More...
 
- Public Attributes inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >
SymmetryImp< View > ** _syms
 Array of symmetry implementations. More...
 
int _nsyms
 Number of symmetry implementations. More...
 
int _prevPos
 

Additional Inherited Members

- Protected Types inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >
typedef void(* VarValPrint) (const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o)
 Function type for printing variable and value selection. More...
 
- Protected Types inherited from Gecode::ViewValBrancher< View, n, Val, a >
typedef void(* VarValPrint) (const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o)
 Function type for printing variable and value selection. More...
 
- Protected Types inherited from Gecode::ViewBrancher< View, n >
typedef BranchTraits< typename View::VarType >::Filter BranchFilter
 The branch filter that corresponds to the var type. More...
 
- Protected Member Functions inherited from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >
 LDSBBrancher (Space &home, bool share, LDSBBrancher &b)
 Constructor for cloning b. More...
 
 LDSBBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter bf, VarValPrint vvp)
 Constructor for creation. More...
 
- Protected Member Functions inherited from Gecode::ViewValBrancher< View, n, Val, a >
 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 bf, VarValPrint vvp)
 Constructor for creation. More...
 
- Protected Member Functions inherited from Gecode::ViewBrancher< View, 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, n > &b)
 Constructor for cloning b. More...
 
 ViewBrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], BranchFilter 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 inherited from Gecode::ViewValBrancher< View, n, Val, a >
ValSelCommitBase< View, Val > * vsc
 Value selection and commit object. More...
 
VarValPrint vvp
 Print function. More...
 
- Protected Attributes inherited from Gecode::ViewBrancher< View, 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...
 
BranchFilter bf
 Branch filter function. More...
 

Detailed Description

template<class View, int n, class Val, unsigned int a>
class Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >

Symmetry-breaking brancher with generic view and value selection.

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

Definition at line 61 of file ldsb.hh.

Member Typedef Documentation

template<class View, int n, class Val, unsigned int a>
typedef void(* Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::VarValPrint) (const Space &home, const BrancherHandle &bh, unsigned int b, typename View::VarType x, int i, const Val &m, std::ostream &o)

Function type for printing variable and value selection.

Definition at line 64 of file ldsb.hh.

Constructor & Destructor Documentation

template<class View , int n, class Val , unsigned int a>
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::LDSBSetBrancher ( Space home,
bool  share,
LDSBSetBrancher< View, n, Val, a > &  b 
)

Constructor for cloning b.

Definition at line 71 of file brancher.hpp.

template<class View , int n, class Val , unsigned int a>
Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::LDSBSetBrancher ( Home  home,
ViewArray< View > &  x,
ViewSel< View > *  vs[n],
ValSelCommitBase< View, Val > *  vsc,
SymmetryImp< View > **  syms,
int  nsyms,
SetBranchFilter  bf,
VarValPrint  vvp 
)

Constructor for creation.

Definition at line 42 of file brancher.hpp.

Member Function Documentation

template<class View , int n, class Val , unsigned int a>
const Choice * Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::choice ( Space home)
virtual

Return choice.

Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.

Definition at line 180 of file brancher.hpp.

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

Perform commit for choice c and alternative b.

Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.

Definition at line 199 of file brancher.hpp.

template<class View , int n, class Val , unsigned int a>
Actor * Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::copy ( Space home,
bool  share 
)
virtual

Perform cloning.

Reimplemented from Gecode::Int::LDSB::LDSBBrancher< View, n, Val, a >.

Definition at line 241 of file brancher.hpp.

template<class View , int n, class Val , unsigned int a>
BrancherHandle Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::post ( Home  home,
ViewArray< View > &  x,
ViewSel< View > *  vs[n],
ValSelCommitBase< View, Val > *  vsc,
SymmetryImp< View > **  _syms,
int  _nsyms,
SetBranchFilter  bf,
VarValPrint  vvp 
)
inlinestatic

Brancher post function.

Definition at line 248 of file brancher.hpp.

template<class View , int n, class Val , unsigned int a>
void Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::updatePart1 ( Space home,
int  choicePos 
)

Part one of the update phase.

If the branching is at a new variable, restore previously copied value symmetries, do bulk update of values used on left branches for the previous variable, and make fresh copy of resulting value symmetries.

Definition at line 133 of file brancher.hpp.

Member Data Documentation

template<class View, int n, class Val, unsigned int a>
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_prevPos

Position of previous variable that was branched on.

Definition at line 70 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nNonValueSymmetries

Number of non-value symmetries.

Definition at line 72 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nValueSymmetries

Number of value symmetries.

Definition at line 74 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
ValueSymmetryImp<View>** Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_copiedSyms

Copy of value symmetries from the first node where the current variable was branched on.

Definition at line 77 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
int Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_nCopiedSyms

Number of copied symmetries.

Definition at line 79 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
IntSet Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_leftBranchValues

Set of values used on left branches for the current variable.

Definition at line 81 of file ldsb.hh.

template<class View, int n, class Val, unsigned int a>
bool Gecode::Set::LDSB::LDSBSetBrancher< View, n, Val, a >::_stable

Is the state of the brancher "stable"?

The brancher is unstable if we are about to run either "choice" or "commit", but "updatePart1" has not been run. After "updatePart1" has been run the brancher is stable, until the second part of the update is done (in commit).

Definition at line 90 of file ldsb.hh.


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