Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::ValCommitFunction< View > Class Template Reference

Class for user-defined value commit. More...

#include <val-commit.hpp>

Public Types

typedef View::VarType Var
 The corresponding variable type.
 
typedef BranchTraits< Var >::Commit CommitFunction
 The corresponding commit function.
 
- Public Types inherited from Gecode::ValCommit< View, BranchTraits< View::VarType >::ValType >
typedef View View
 View type.
 
typedef View::VarType Var
 Corresponding variable type.
 
typedef BranchTraits< View::VarType >::ValType Val
 Value type.
 

Public Member Functions

 ValCommitFunction (Space &home, const ValBranch< Var > &vb)
 Constructor for initialization.
 
 ValCommitFunction (Space &home, ValCommitFunction &vc)
 Constructor for cloning during copying.
 
ModEvent commit (Space &home, unsigned int a, View x, int i, Val n)
 Perform user-defined commit.
 
NGLngl (Space &home, unsigned int a, View x, Val n) const
 Create no-good literal for alternative a.
 
void print (const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const
 Print on o the alternative with view x at position i and value n.
 
bool notice (void) const
 Whether dispose must always be called (that is, notice is needed)
 
void dispose (Space &home)
 Delete value commit.
 
- Public Member Functions inherited from Gecode::ValCommit< View, BranchTraits< View::VarType >::ValType >
 ValCommit (Space &home, const ValBranch< Var > &vb)
 Constructor for initialization.
 
 ValCommit (Space &home, ValCommit< View, Val > &vs)
 Constructor for cloning.
 
bool notice (void) const
 Whether dispose must always be called (that is, notice is needed)
 
void dispose (Space &home)
 Delete value commit.
 

Protected Attributes

SharedData< CommitFunctionc
 The user-defined commit function.
 

Detailed Description

template<class View>
class Gecode::ValCommitFunction< View >

Class for user-defined value commit.

Definition at line 65 of file val-commit.hpp.

Member Typedef Documentation

◆ Var

template<class View >
View::VarType Gecode::ValCommitFunction< View >::Var

The corresponding variable type.

Definition at line 73 of file val-commit.hpp.

◆ CommitFunction

template<class View >
BranchTraits<Var>::Commit Gecode::ValCommitFunction< View >::CommitFunction

The corresponding commit function.

Definition at line 75 of file val-commit.hpp.

Constructor & Destructor Documentation

◆ ValCommitFunction() [1/2]

template<class View >
Gecode::ValCommitFunction< View >::ValCommitFunction ( Space & home,
const ValBranch< Var > & vb )
inline

Constructor for initialization.

Definition at line 118 of file val-commit.hpp.

◆ ValCommitFunction() [2/2]

template<class View >
Gecode::ValCommitFunction< View >::ValCommitFunction ( Space & home,
ValCommitFunction< View > & vc )
inline

Constructor for cloning during copying.

Definition at line 126 of file val-commit.hpp.

Member Function Documentation

◆ commit()

template<class View >
ModEvent Gecode::ValCommitFunction< View >::commit ( Space & home,
unsigned int a,
View x,
int i,
Val n )
inline

Perform user-defined commit.

Definition at line 132 of file val-commit.hpp.

◆ ngl()

template<class View >
NGL * Gecode::ValCommitFunction< View >::ngl ( Space & home,
unsigned int a,
View x,
Val n ) const
inline

Create no-good literal for alternative a.

Definition at line 141 of file val-commit.hpp.

◆ print()

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

Print on o the alternative with view x at position i and value n.

Definition at line 146 of file val-commit.hpp.

◆ notice()

template<class View >
bool Gecode::ValCommitFunction< View >::notice ( void ) const
inline

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

Definition at line 153 of file val-commit.hpp.

◆ dispose()

template<class View >
void Gecode::ValCommitFunction< View >::dispose ( Space & home)
inline

Delete value commit.

Definition at line 158 of file val-commit.hpp.

Member Data Documentation

◆ c

template<class View >
SharedData<CommitFunction> Gecode::ValCommitFunction< View >::c
protected

The user-defined commit function.

Definition at line 78 of file val-commit.hpp.


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