Gecode::ViewSel< _View > Class Template Reference
[Generic view selection for brancher based on view and value selection]
Abstract class for view selection. More...
#include <view-sel.hpp>
Public Types | |
| typedef _View | View |
| Define the view type. | |
| typedef View::VarType | Var |
| The corresponding variable type. | |
Initialization | |
|
| |
| ViewSel (Space &home, const VarBranch< Var > &vb) | |
| Constructor for creation. | |
| ViewSel (Space &home, 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, BrancherFilter< View > &f)=0 |
| Select a view from x starting from s and return its position. | |
| virtual int | select (Space &home, ViewArray< View > &x, int s, BrancherNoFilter< View > &f) |
| 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, BrancherFilter< View > &f)=0 |
| Select ties from x starting from s. | |
| virtual void | ties (Space &home, ViewArray< View > &x, int s, int *ties, int &n, BrancherNoFilter< View > &f) |
| 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)=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. | |
| virtual | ~ViewSel (void) |
| Unused destructor. | |
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. | |
Detailed Description
template<class _View>
class Gecode::ViewSel< _View >
Abstract class for view selection.
Definition at line 44 of file view-sel.hpp.
Member Typedef Documentation
| typedef _View Gecode::ViewSel< _View >::View |
Define the view type.
Reimplemented in Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, and Gecode::ViewSelChooseTbl< ChooseMax, Merit >.
Definition at line 47 of file view-sel.hpp.
| typedef View::VarType Gecode::ViewSel< _View >::Var |
The corresponding variable type.
Reimplemented in Gecode::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, and Gecode::ViewSelChooseTbl< ChooseMax, Merit >.
Definition at line 49 of file view-sel.hpp.
Constructor & Destructor Documentation
| Gecode::ViewSel< View >::ViewSel | ( | Space & | home, | |
| const VarBranch< Var > & | vb | |||
| ) | [inline] |
Constructor for creation.
Definition at line 377 of file view-sel.hpp.
| Gecode::ViewSel< View >::ViewSel | ( | Space & | home, | |
| ViewSel< View > & | vs | |||
| ) | [inline] |
Constructor for copying during cloning.
Definition at line 380 of file view-sel.hpp.
| Gecode::ViewSel< View >::~ViewSel | ( | void | ) | [inline, virtual] |
Unused destructor.
Definition at line 404 of file view-sel.hpp.
Member Function Documentation
| 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::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
| virtual int Gecode::ViewSel< _View >::select | ( | Space & | home, | |
| ViewArray< View > & | x, | |||
| int | s, | |||
| BrancherFilter< View > & | f | |||
| ) | [pure virtual] |
Select a view from x starting from s and return its position.
Implemented in Gecode::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
| int Gecode::ViewSel< View >::select | ( | Space & | home, | |
| ViewArray< View > & | x, | |||
| int | s, | |||
| BrancherNoFilter< View > & | f | |||
| ) | [inline, virtual] |
Select a view from x starting from s and return its position.
Definition at line 383 of file view-sel.hpp.
| 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::ViewSelNone< View >, Gecode::ViewSelRnd< View >, 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, | |||
| BrancherFilter< View > & | f | |||
| ) | [pure virtual] |
Select ties from x starting from s.
Implemented in Gecode::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
| void Gecode::ViewSel< View >::ties | ( | Space & | home, | |
| ViewArray< View > & | x, | |||
| int | s, | |||
| int * | ties, | |||
| int & | n, | |||
| BrancherNoFilter< View > & | f | |||
| ) | [inline, virtual] |
Select ties from x starting from s.
Definition at line 390 of file view-sel.hpp.
| 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::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
| 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::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, and Gecode::ViewSelChoose< ChooseMin, Merit >.
| virtual ViewSel<View>* Gecode::ViewSel< _View >::copy | ( | Space & | home | ) | [pure virtual] |
Create copy during cloning.
Implemented in Gecode::ViewSelNone< View >, Gecode::ViewSelRnd< View >, Gecode::ViewSelMin< Merit >, Gecode::ViewSelMinTbl< Merit >, Gecode::ViewSelMax< Merit >, and Gecode::ViewSelMaxTbl< Merit >.
| bool Gecode::ViewSel< View >::notice | ( | void | ) | const [inline, virtual] |
Whether dispose must always be called (that is, notice is needed).
Reimplemented in Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, and Gecode::ViewSelChooseTbl< ChooseMax, Merit >.
Definition at line 397 of file view-sel.hpp.
| void Gecode::ViewSel< View >::dispose | ( | Space & | home | ) | [inline, virtual] |
Dispose view selection.
Reimplemented in Gecode::ViewSelChoose< Choose, Merit >, Gecode::ViewSelChooseTbl< Choose, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChoose< ChooseMax, Merit >, Gecode::ViewSelChoose< ChooseMin, Merit >, Gecode::ViewSelChooseTbl< ChooseMin, Merit >, and Gecode::ViewSelChooseTbl< ChooseMax, Merit >.
Definition at line 402 of file view-sel.hpp.
| void * Gecode::ViewSel< View >::operator new | ( | size_t | s, | |
| Space & | home | |||
| ) | [inline, static] |
Allocate memory from space.
Definition at line 413 of file view-sel.hpp.
| void Gecode::ViewSel< View >::operator delete | ( | void * | p, | |
| Space & | home | |||
| ) | [inline, static] |
Return memory to space.
Definition at line 410 of file view-sel.hpp.
| void Gecode::ViewSel< View >::operator delete | ( | void * | p | ) | [inline, static] |
Needed for exceptions.
Definition at line 407 of file view-sel.hpp.
The documentation for this class was generated from the following file:
- gecode/kernel/branch/view-sel.hpp
