Generated on Sat Feb 7 2015 02:01:42 for Gecode by doxygen 1.8.9.1

Select a view randomly. More...

#include <brancher-view-sel.hpp>

Protected Attributes

Rnd r
 The random number generator used. More...
 

Initialization

 ViewSelRnd (Space &home, const VarBranch &vb)
 Constructor for creation. More...
 
 ViewSelRnd (Space &home, bool shared, ViewSelRnd< View > &vs)
 Constructor for copying during cloning. More...
 

View selection and tie breaking

virtual int select (Space &home, ViewArray< View > &x, int s)
 Select a view from x starting from s and return its position. More...
 
virtual int select (Space &home, ViewArray< View > &x, int s, BranchFilter bf)
 Select a view from x starting from s and return its position. More...
 
virtual void ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n)
 Select ties from x starting from s. More...
 
virtual void ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n, BranchFilter bf)
 Select ties from x starting from s. More...
 
virtual void brk (Space &home, ViewArray< View > &x, int *ties, int &n)
 Break ties in x and update to new ties. More...
 
virtual int select (Space &home, ViewArray< View > &x, int *ties, int n)
 Select a view from x considering view with positions in ties. More...
 

Resource management and cloning

virtual ViewSel< View > * copy (Space &home, bool shared)
 Create copy during cloning. More...
 

Additional Inherited Members

- Public Types inherited from Gecode::ViewSel< View >
typedef View View
 Define the view type. More...
 
typedef BranchTraits< typename View::VarType >::Filter BranchFilter
 The branch filter that corresponds to the view type. More...
 
- Public Member Functions inherited from Gecode::ViewSel< View >
 ViewSel (Space &home, const VarBranch &vb)
 Constructor for creation. More...
 
 ViewSel (Space &home, bool shared, ViewSel< View > &vs)
 Constructor for copying during cloning. More...
 
virtual int select (Space &home, ViewArray< View > &x, int s, BranchFilter bf)=0
 Select a view from x starting from s and return its position. More...
 
virtual void ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n, BranchFilter bf)=0
 Select ties from x starting from s. More...
 
virtual bool notice (void) const
 Whether dispose must always be called (that is, notice is needed) More...
 
virtual void dispose (Space &home)
 Dispose view selection. More...
 
- Static Public Member Functions inherited from Gecode::ViewSel< View >
static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 Return memory to space. More...
 
static void operator delete (void *p)
 Needed for exceptions. More...
 

Detailed Description

template<class View>
class Gecode::ViewSelRnd< View >

Select a view randomly.

Definition at line 142 of file brancher-view-sel.hpp.

Constructor & Destructor Documentation

template<class View >
Gecode::ViewSelRnd< View >::ViewSelRnd ( Space home,
const VarBranch vb 
)
inline

Constructor for creation.

Definition at line 448 of file brancher-view-sel.hpp.

template<class View >
Gecode::ViewSelRnd< View >::ViewSelRnd ( Space home,
bool  shared,
ViewSelRnd< View > &  vs 
)
inline

Constructor for copying during cloning.

Definition at line 452 of file brancher-view-sel.hpp.

Member Function Documentation

template<class View >
int Gecode::ViewSelRnd< View >::select ( Space home,
ViewArray< View > &  x,
int  s 
)
virtual

Select a view from x starting from s and return its position.

Implements Gecode::ViewSel< View >.

Definition at line 456 of file brancher-view-sel.hpp.

template<class View >
int Gecode::ViewSelRnd< View >::select ( Space home,
ViewArray< View > &  x,
int  s,
BranchFilter  bf 
)
virtual

Select a view from x starting from s and return its position.

Definition at line 468 of file brancher-view-sel.hpp.

template<class View >
void Gecode::ViewSelRnd< View >::ties ( Space home,
ViewArray< View > &  x,
int  s,
int *  ties,
int &  n 
)
virtual

Select ties from x starting from s.

Implements Gecode::ViewSel< View >.

Definition at line 484 of file brancher-view-sel.hpp.

template<class View >
void Gecode::ViewSelRnd< View >::ties ( Space home,
ViewArray< View > &  x,
int  s,
int *  ties,
int &  n,
BranchFilter  bf 
)
virtual

Select ties from x starting from s.

Definition at line 490 of file brancher-view-sel.hpp.

template<class View >
void Gecode::ViewSelRnd< View >::brk ( Space home,
ViewArray< View > &  x,
int *  ties,
int &  n 
)
virtual

Break ties in x and update to new ties.

Implements Gecode::ViewSel< View >.

Definition at line 496 of file brancher-view-sel.hpp.

template<class View >
int Gecode::ViewSelRnd< View >::select ( Space home,
ViewArray< View > &  x,
int *  ties,
int  n 
)
virtual

Select a view from x considering view with positions in ties.

Implements Gecode::ViewSel< View >.

Definition at line 502 of file brancher-view-sel.hpp.

template<class View >
ViewSel< View > * Gecode::ViewSelRnd< View >::copy ( Space home,
bool  shared 
)
virtual

Create copy during cloning.

Implements Gecode::ViewSel< View >.

Definition at line 507 of file brancher-view-sel.hpp.

Member Data Documentation

template<class View>
Rnd Gecode::ViewSelRnd< View >::r
protected

The random number generator used.

Definition at line 146 of file brancher-view-sel.hpp.


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