Abstract class for view selection. More...
#include <brancher-view-sel.hpp>
Public Types | |
typedef _View | View |
Define the view type. | |
typedef BranchTraits< typename View::VarType >::Filter | BranchFilter |
The branch filter that corresponds to the view type. | |
Initialization | |
ViewSel (Space &home, const VarBranch &vb) | |
Constructor for creation. | |
ViewSel (Space &home, bool shared, ViewSel< View > &vs) | |
Constructor for copying during cloning. | |
View selection and tie breaking | |
virtual int | select (Space &home, ViewArray< View > &x, int s)=0 |
Select a view from x starting from s and return its position. | |
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. | |
virtual void | ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n)=0 |
Select ties from x starting from s. | |
virtual void | ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n, BranchFilter bf)=0 |
Select ties from x starting from s. | |
virtual void | brk (Space &home, ViewArray< View > &x, int *ties, int &n)=0 |
Break ties in x and update to new ties. | |
virtual int | select (Space &home, ViewArray< View > &x, int *ties, int n)=0 |
Select a view from x considering views with positions in ties. | |
Resource management and cloning | |
virtual ViewSel< View > * | copy (Space &home, bool shared)=0 |
Create copy during cloning. | |
virtual bool | notice (void) const |
Whether dispose must always be called (that is, notice is needed) | |
virtual void | dispose (Space &home) |
Dispose view selection. | |
Memory management | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void | operator delete (void *p, Space &home) |
Return memory to space. | |
static void | operator delete (void *p) |
Needed for exceptions. |
Abstract class for view selection.
Definition at line 48 of file brancher-view-sel.hpp.
typedef _View Gecode::ViewSel< _View >::View |
Define the view type.
Reimplemented in Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMax, Merit >, Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
Definition at line 51 of file brancher-view-sel.hpp.
typedef BranchTraits<typename View::VarType>::Filter Gecode::ViewSel< _View >::BranchFilter |
The branch filter that corresponds to the view type.
Reimplemented in Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMax, Merit >, Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
Definition at line 53 of file brancher-view-sel.hpp.
Gecode::ViewSel< View >::ViewSel | ( | Space & | home, |
const VarBranch & | vb | ||
) | [inline] |
Constructor for creation.
Definition at line 361 of file brancher-view-sel.hpp.
Gecode::ViewSel< View >::ViewSel | ( | Space & | home, |
bool | shared, | ||
ViewSel< View > & | vs | ||
) | [inline] |
Constructor for copying during cloning.
Definition at line 364 of file brancher-view-sel.hpp.
virtual int Gecode::ViewSel< _View >::select | ( | Space & | home, |
ViewArray< View > & | x, | ||
int | s | ||
) | [pure virtual] |
Select a view from x starting from s and return its position.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelRnd< View >, and Gecode::ViewSelNone< View >.
virtual int Gecode::ViewSel< _View >::select | ( | Space & | home, |
ViewArray< View > & | x, | ||
int | s, | ||
BranchFilter | bf | ||
) | [pure virtual] |
Select a view from x starting from s and return its position.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
virtual void Gecode::ViewSel< _View >::ties | ( | Space & | home, |
ViewArray< View > & | x, | ||
int | s, | ||
int * | ties, | ||
int & | n | ||
) | [pure virtual] |
Select ties from x starting from s.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelRnd< View >, and Gecode::ViewSelNone< View >.
virtual void Gecode::ViewSel< _View >::ties | ( | Space & | home, |
ViewArray< View > & | x, | ||
int | s, | ||
int * | ties, | ||
int & | n, | ||
BranchFilter | bf | ||
) | [pure virtual] |
Select ties from x starting from s.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
virtual void Gecode::ViewSel< _View >::brk | ( | Space & | home, |
ViewArray< View > & | x, | ||
int * | ties, | ||
int & | n | ||
) | [pure virtual] |
Break ties in x and update to new ties.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelRnd< View >, and Gecode::ViewSelNone< View >.
virtual int Gecode::ViewSel< _View >::select | ( | Space & | home, |
ViewArray< View > & | x, | ||
int * | ties, | ||
int | n | ||
) | [pure virtual] |
Select a view from x considering views with positions in ties.
Implemented in Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelRnd< View >, and Gecode::ViewSelNone< View >.
virtual ViewSel<View>* Gecode::ViewSel< _View >::copy | ( | Space & | home, |
bool | shared | ||
) | [pure virtual] |
Create copy during cloning.
Implemented in Gecode::ViewSelMaxTbl< Merit >, Gecode::ViewSelMax< Merit >, Gecode::ViewSelMinTbl< Merit >, Gecode::ViewSelMin< Merit >, Gecode::ViewSelRnd< View >, and Gecode::ViewSelNone< View >.
bool Gecode::ViewSel< View >::notice | ( | void | ) | const [virtual] |
Whether dispose must always be called (that is, notice is needed)
Reimplemented in Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
Definition at line 367 of file brancher-view-sel.hpp.
void Gecode::ViewSel< View >::dispose | ( | Space & | home | ) | [virtual] |
Dispose view selection.
Reimplemented in Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
Definition at line 372 of file brancher-view-sel.hpp.
void * Gecode::ViewSel< View >::operator new | ( | size_t | s, |
Space & | home | ||
) | [inline, static] |
Allocate memory from space.
Definition at line 381 of file brancher-view-sel.hpp.
void Gecode::ViewSel< View >::operator delete | ( | void * | p, |
Space & | home | ||
) | [inline, static] |
Return memory to space.
Definition at line 378 of file brancher-view-sel.hpp.
void Gecode::ViewSel< View >::operator delete | ( | void * | p | ) | [inline, static] |
Needed for exceptions.
Definition at line 375 of file brancher-view-sel.hpp.