42 template<
class _View,
class _Val>
49 typedef typename View::VarType
Var;
58 virtual Val
val(
const Space& home, View
x,
int i) = 0;
61 View
x,
int i, Val
n) = 0;
64 View
x, Val
n)
const = 0;
66 virtual void print(
const Space& home,
unsigned int a,
67 View
x,
int i,
const Val&
n,
68 std::ostream& o)
const = 0;
72 virtual bool notice(
void)
const = 0;
79 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>
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>
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>
208 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.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
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.
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.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
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.