Generated on Tue Mar 24 2020 14:04:04 for Gecode by doxygen 1.8.17
Gecode::ValSelCommit< ValSel, ValCommit > Class Template Reference

Class for value selection and commit. More...

#include <val-sel-commit.hpp>

Public Member Functions

 ValSelCommit (Space &home, const ValBranch< Var > &vb)
 Constructor for initialization. More...
 
 ValSelCommit (Space &home, ValSelCommit< ValSel, ValCommit > &vsc)
 Constructor for cloning. More...
 
virtual Val val (const Space &home, View x, int i)
 Return value of view x at position i. More...
 
virtual ModEvent commit (Space &home, unsigned int a, View x, int i, Val n)
 Commit view x at position i to value n for alternative a. More...
 
virtual NGLngl (Space &home, unsigned int a, View x, Val n) const
 Create no-good literal for choice c and alternative a. More...
 
virtual void print (const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const
 Print on o branch for alternative a, view x at position i, and value n. More...
 
virtual ValSelCommit< ValSel, ValCommit > * copy (Space &home)
 Perform cloning. More...
 
virtual bool notice (void) const
 Whether dispose must always be called (that is, notice is needed) More...
 
virtual void dispose (Space &home)
 Delete value selection. More...
 
- Public Member Functions inherited from Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >
 ValSelCommitBase (Space &home, const ValBranch< Var > &vb)
 Constructor for initialization. More...
 
 ValSelCommitBase (Space &home, ValSelCommitBase< View, Val > &vsc)
 Constructor for cloning. More...
 
virtual ~ValSelCommitBase (void)
 Unused destructor. More...
 

Protected Types

typedef ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::Var Var
 
typedef ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::Val Val
 
typedef ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::View View
 

Protected Attributes

ValSel s
 The value selection object used. More...
 
ValCommit c
 The commit object used. More...
 

Additional Inherited Members

- Public Types inherited from Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >
typedef ValSel::View View
 View type. More...
 
typedef View::VarType Var
 Corresponding variable type. More...
 
typedef ValSel::Val Val
 Value type. More...
 
- Static Public Member Functions inherited from Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >
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 ValSel, class ValCommit>
class Gecode::ValSelCommit< ValSel, ValCommit >

Class for value selection and commit.

Definition at line 90 of file val-sel-commit.hpp.

Member Typedef Documentation

◆ Var

template<class ValSel , class ValCommit >
typedef ValSelCommitBase<typename ValSel::View, typename ValSel::Val>::Var Gecode::ValSelCommit< ValSel, ValCommit >::Var
protected

Definition at line 94 of file val-sel-commit.hpp.

◆ Val

template<class ValSel , class ValCommit >
typedef ValSelCommitBase<typename ValSel::View, typename ValSel::Val>::Val Gecode::ValSelCommit< ValSel, ValCommit >::Val
protected

Definition at line 96 of file val-sel-commit.hpp.

◆ View

template<class ValSel , class ValCommit >
typedef ValSelCommitBase<typename ValSel::View, typename ValSel::Val>::View Gecode::ValSelCommit< ValSel, ValCommit >::View
protected

Definition at line 98 of file val-sel-commit.hpp.

Constructor & Destructor Documentation

◆ ValSelCommit() [1/2]

template<class ValSel , class ValCommit >
Gecode::ValSelCommit< ValSel, ValCommit >::ValSelCommit ( Space home,
const ValBranch< Var > &  vb 
)
inline

Constructor for initialization.

Definition at line 157 of file val-sel-commit.hpp.

◆ ValSelCommit() [2/2]

template<class ValSel , class ValCommit >
Gecode::ValSelCommit< ValSel, ValCommit >::ValSelCommit ( Space home,
ValSelCommit< ValSel, ValCommit > &  vsc 
)
inline

Constructor for cloning.

Definition at line 163 of file val-sel-commit.hpp.

Member Function Documentation

◆ val()

template<class ValSel , class ValCommit >
ValSelCommit< ValSel, ValCommit >::Val Gecode::ValSelCommit< ValSel, ValCommit >::val ( const Space home,
View  x,
int  i 
)
virtual

Return value of view x at position i.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 170 of file val-sel-commit.hpp.

◆ commit()

template<class ValSel , class ValCommit >
ModEvent Gecode::ValSelCommit< ValSel, ValCommit >::commit ( Space home,
unsigned int  a,
View  x,
int  i,
Val  n 
)
virtual

Commit view x at position i to value n for alternative a.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 176 of file val-sel-commit.hpp.

◆ ngl()

template<class ValSel , class ValCommit >
NGL * Gecode::ValSelCommit< ValSel, ValCommit >::ngl ( Space home,
unsigned int  a,
View  x,
Val  n 
) const
virtual

Create no-good literal for choice c and alternative a.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 183 of file val-sel-commit.hpp.

◆ print()

template<class ValSel , class ValCommit >
void Gecode::ValSelCommit< ValSel, ValCommit >::print ( const Space home,
unsigned int  a,
View  x,
int  i,
const Val n,
std::ostream &  o 
) const
virtual

Print on o branch for alternative a, view x at position i, and value n.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 190 of file val-sel-commit.hpp.

◆ copy()

template<class ValSel , class ValCommit >
ValSelCommit< ValSel, ValCommit > * Gecode::ValSelCommit< ValSel, ValCommit >::copy ( Space home)
virtual

Perform cloning.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 198 of file val-sel-commit.hpp.

◆ notice()

template<class ValSel , class ValCommit >
bool Gecode::ValSelCommit< ValSel, ValCommit >::notice ( void  ) const
virtual

Whether dispose must always be called (that is, notice is needed)

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 204 of file val-sel-commit.hpp.

◆ dispose()

template<class ValSel , class ValCommit >
void Gecode::ValSelCommit< ValSel, ValCommit >::dispose ( Space home)
virtual

Delete value selection.

Implements Gecode::ValSelCommitBase< ValSel::View, ValSel::Val >.

Definition at line 210 of file val-sel-commit.hpp.

Member Data Documentation

◆ s

template<class ValSel , class ValCommit >
ValSel Gecode::ValSelCommit< ValSel, ValCommit >::s
protected

The value selection object used.

Definition at line 100 of file val-sel-commit.hpp.

◆ c

template<class ValSel , class ValCommit >
ValCommit Gecode::ValSelCommit< ValSel, ValCommit >::c
protected

The commit object used.

Definition at line 102 of file val-sel-commit.hpp.


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