46 template<
class _View,
class _Val>
61 virtual Val
val(
const Space& home, View
x,
int i) = 0;
64 View
x,
int i, Val
n) = 0;
67 View
x, Val
n)
const = 0;
69 virtual void print(
const Space& home,
unsigned int a,
70 View
x,
int i,
const Val&
n,
71 std::ostream& o)
const = 0;
75 virtual bool notice(
void)
const = 0;
80 static void*
operator new(
size_t s,
Space& home);
83 static void operator delete(
void*
p,
Space& home);
85 static void operator delete(
void*
p);
90 template<
class ValSel,
class ValCommit>
109 virtual Val
val(
const Space& home, View
x,
int i);
114 View
x, Val
n)
const;
116 virtual void print(
const Space& home,
unsigned int a,
117 View
x,
int i,
const Val&
n,
118 std::ostream& o)
const;
122 virtual bool notice(
void)
const;
129 template<
class View,
class Val>
132 template<
class View,
class Val>
137 template<
class View,
class Val>
140 template<
class View,
class Val>
143 template<
class View,
class Val>
146 return home.ralloc(s);
152 template<
class ValSel,
class ValCommit>
158 template<
class ValSel,
class ValCommit>
163 s(home,shared,vsc.s),
c(home,shared,vsc.
c) {}
165 template<
class ValSel,
class ValCommit>
168 return s.
val(home,x,i);
171 template<
class ValSel,
class ValCommit>
175 return c.commit(home,a,x,i,n);
178 template<
class ValSel,
class ValCommit>
182 return c.ngl(home, a, x, n);
185 template<
class ValSel,
class ValCommit>
189 std::ostream& o)
const {
190 c.print(home,a,x,i,n,o);
193 template<
class ValSel,
class ValCommit>
199 template<
class ValSel,
class ValCommit>
202 return s.
notice() ||
c.notice();
205 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.
virtual bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
ValSelCommitBase(Space &home, const ValBranch &vb)
Constructor for initialization.
ValCommit c
The commit object used.
int ModEvent
Type for modification events.
virtual void dispose(Space &home)=0
Delete value selection.
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.
ValSel s
The value selection object used.
ValSelCommit(Space &home, const ValBranch &vb)
Constructor for initialization.
virtual ValSelCommit< ValSel, ValCommit > * copy(Space &home, bool shared)
Perform cloning.
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
Node * x
Pointer to corresponding Boolean expression node.
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const =0
Create no-good literal for choice c and alternative a.
virtual ValSelCommitBase< View, Val > * copy(Space &home, bool shared)=0
Perform cloning.
virtual NGL * ngl(Space &home, unsigned int a, View x, Val n) const
Create no-good literal for choice c and alternative a.
virtual bool notice(void) const =0
Whether dispose must always be called (that is, notice is needed)
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
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 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.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
Base class for value selection.
No-good literal recorded during search.