46 template<
class _View,
class _Val>
53 typedef typename View::VarType
Var;
62 virtual Val
val(
const Space& home, View
x,
int i) = 0;
65 View
x,
int i, Val
n) = 0;
68 View
x, Val
n)
const = 0;
70 virtual void print(
const Space& home,
unsigned int a,
71 View
x,
int i,
const Val&
n,
72 std::ostream& o)
const = 0;
76 virtual bool notice(
void)
const = 0;
83 static void*
operator new(
size_t s,
Space& home);
86 static void operator delete(
void*
p,
Space& home);
88 static void operator delete(
void*
p);
93 template<
class ValSel,
class ValCommit>
113 virtual Val
val(
const Space& home, View
x,
int i);
118 View
x, Val
n)
const;
120 virtual void print(
const Space& home,
unsigned int a,
121 View
x,
int i,
const Val&
n,
122 std::ostream& o)
const;
126 virtual bool notice(
void)
const;
133 template<
class View,
class Val>
137 template<
class View,
class Val>
141 template<
class View,
class Val>
144 template<
class View,
class Val>
147 template<
class View,
class Val>
150 template<
class View,
class Val>
153 return home.ralloc(s);
159 template<
class ValSel,
class ValCommit>
165 template<
class ValSel,
class ValCommit>
170 s(home,vsc.s),
c(home,vsc.
c) {}
172 template<
class ValSel,
class ValCommit>
175 return s.
val(home,x,i);
178 template<
class ValSel,
class ValCommit>
182 return c.commit(home,a,x,i,n);
185 template<
class ValSel,
class ValCommit>
189 return c.ngl(home, a, x, n);
192 template<
class ValSel,
class ValCommit>
196 std::ostream& o)
const {
197 c.print(home,a,x,i,n,o);
200 template<
class ValSel,
class ValCommit>
206 template<
class ValSel,
class ValCommit>
212 template<
class ValSel,
class ValCommit>
virtual void dispose(Space &home)
Delete value selection.
ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::Val Val
Class for value selection and commit.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
virtual ~ValSelCommitBase(void)
Unused destructor.
ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::Var Var
ValCommit c
The commit object used.
int ModEvent
Type for modification events.
virtual void dispose(Space &home)=0
Delete value selection.
virtual ValSelCommit< ValSel, ValCommit > * copy(Space &home)
Perform cloning.
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.
Base class for value selection and commit.
virtual Val val(const Space &home, View x, int i)
Return value of view x at position i.
Base class for value commit.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
virtual void print(const Space &home, unsigned int a, View x, int i, const Val &n, std::ostream &o) const =0
Print on o branch for alternative a, view x at position i, and value n.
ValSelCommit(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
void dispose(Space &home)
Delete value commit.
ValSel s
The value selection object used.
ValSelCommitBase(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
virtual ValSelCommitBase< View, Val > * copy(Space &home)=0
Perform cloning.
virtual bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
virtual ModEvent commit(Space &home, unsigned int a, View x, int i, Val n)=0
Commit view x at position i to value n for alternative a.
Value branching information.
ValSelCommitBase< typename ValSel::View, typename ValSel::Val >::View View
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const =0
Create no-good literal for choice c and alternative a.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
View::VarType Var
Corresponding variable type.
Post propagator for SetVar x
virtual bool notice(void) const =0
Whether dispose must always be called (that is, notice is needed)
Gecode toplevel namespace
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.
virtual Val val(const Space &home, View x, int i)=0
Return value of view x at position i.
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const
Create no-good literal for choice c and alternative a.
Base class for value selection.
No-good literal recorded during search.