43 template<
class _View,
class _Val>
49 typedef typename View::VarType
Var;
68 std::ostream& o)
const = 0;
80 static void*
operator new(
size_t s,
Space& home);
82 static void operator delete(
void*
p,
Space& home);
84 static void operator delete(
void*
p);
89 template<
class ValSel,
class ValCommit>
116 virtual void print(
const Space& home,
unsigned int a,
118 std::ostream& o)
const;
122 virtual bool notice(
void)
const;
129 template<
class View,
class Val>
133 template<
class View,
class Val>
137 template<
class View,
class Val>
140 template<
class View,
class Val>
143 template<
class View,
class Val>
146 template<
class View,
class Val>
149 return home.ralloc(s);
155 template<
class ValSel,
class ValCommit>
161 template<
class ValSel,
class ValCommit>
166 s(home,vsc.s), c(home,vsc.c) {}
168 template<
class ValSel,
class ValCommit>
171 return s.
val(home,
x,i);
174 template<
class ValSel,
class ValCommit>
178 return c.commit(home,
a,
x,i,
n);
181 template<
class ValSel,
class ValCommit>
185 return c.ngl(home,
a,
x,
n);
188 template<
class ValSel,
class ValCommit>
192 std::ostream& o)
const {
193 c.print(home,
a,
x,i,
n,o);
196 template<
class ValSel,
class ValCommit>
202 template<
class ValSel,
class ValCommit>
205 return s.
notice() || c.notice();
208 template<
class ValSel,
class ValCommit>
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
No-good literal recorded during search.
Value branching information.
Base class for value commit.
Base class for value selection and commit.
virtual ~ValSelCommitBase(void)
Unused destructor.
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.
View::VarType Var
Corresponding variable type.
virtual Val val(const Space &home, View x, int i)=0
Return value of view x at position i.
virtual ValSelCommitBase< View, Val > * copy(Space &home)=0
Perform cloning.
virtual void dispose(Space &home)=0
Delete value selection.
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.
virtual bool notice(void) const =0
Whether dispose must always be called (that is, notice is needed)
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const =0
Create no-good literal for choice c and alternative a.
ValSelCommitBase(Space &home, ValSelCommitBase< View, Val > &vsc)
Constructor for cloning.
ValSelCommitBase(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Class for value selection and commit.
virtual ValSelCommit< ValSel, ValCommit > * copy(Space &home)
Perform cloning.
ValSelCommitBase< typenameValSel::View, typenameValSel::Val >::Var Var
ValCommit c
The commit object used.
ValSel s
The value selection object used.
ValSelCommitBase< typenameValSel::View, typenameValSel::Val >::View View
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.
virtual Val val(const Space &home, View x, int i)
Return value of view x at position i.
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 bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const
Create no-good literal for choice c and alternative a.
virtual void dispose(Space &home)
Delete value selection.
ValSelCommitBase< typenameValSel::View, typenameValSel::Val >::Val Val
ValSelCommit(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
Base class for value selection.
Gecode toplevel namespace
Post propagator for SetVar x
int ModEvent
Type for modification events.