65 const Pos&
pos(
void)
const;
67 virtual size_t size(
void)
const;
69 virtual void archive(
Archive& e)
const;
78 template<
class View,
int n>
94 View view(
const Pos&
p)
const;
102 virtual bool status(
const Space& home)
const;
104 virtual size_t dispose(
Space& home);
138 template<
class View,
int n>
142 :
Brancher(home),
x(x0), start(0), bf(bf0) {
143 for (
int i=0;
i<
n;
i++)
145 for (
int i=0;
i<
n;
i++)
146 if (
vs[
i]->notice()) {
152 template<
class View,
int n>
157 x.update(home,shared,vb.
x);
158 for (
int i=0;
i<
n;
i++)
162 template<
class View,
int n>
173 typename View::VarType y(
x[
i].varimp());
183 template<
class View,
int n>
196 for (
int i=1; (
i <
n-1) && (n_ties > 1);
i++)
197 vs[
i]->brk(home,
x,ties,n_ties);
211 for (
int i=1; (
i <
n-1) && (n_ties > 1);
i++)
212 vs[
i]->brk(home,
x,ties,n_ties);
223 template<
class View,
int n>
229 template<
class View,
int n>
232 for (
int i=0;
i<
n;
i++)
233 if (
vs[
i]->notice()) {
237 for (
int i=0;
i<
n;
i++)
const Pos & pos(void) const
Return position in array.
BranchFilter bf
Branch filter function.
Actor must always be disposed.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
BranchTraits< typename View::VarType >::Filter BranchFilter
The branch filter that corresponds to the var type.
Generic brancher by view selection.
virtual void ties(Space &home, ViewArray< View > &x, int s, int *ties, int &n)=0
Select ties from x starting from s.
ViewBrancher(Space &home, bool shared, ViewBrancher< View, n > &b)
Constructor for cloning b.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
Pos pos(Space &home)
Return position information.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Base-class for branchers.
int n
Number of negative literals for node type.
ViewSel< View > * vs[n]
View selection objects.
View view(const Pos &p) const
Return view according to position information p.
virtual void archive(Archive &e) const
Archive into e.
unsigned int size(I &i)
Size of all ranges of range iterator i.
struct Gecode::@519::NNF::@60::@62 a
For atomic nodes.
virtual int select(Space &home, ViewArray< View > &x, int s)=0
Select a view from x starting from s and return its position.
PosChoice(const Brancher &b, unsigned int a, const Pos &p)
Initialize choice for brancher b, number of alternatives a, and position p.
virtual size_t size(void) const
Report size occupied.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual void archive(Archive &e) const
Archive into e.
Pos(int p)
Create position information.
struct Gecode::@519::NNF::@60::@61 b
For binary nodes (and, or, eqv)
Node * x
Pointer to corresponding Boolean expression node.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Choice for performing commit
virtual size_t dispose(Space &home)
Delete actor and return its size.
bool assigned(View x, int v)
Whether x is assigned to value v.
int start
Unassigned views start at x[start].
virtual bool status(const Space &home) const
Check status of brancher, return true if alternatives left.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Gecode toplevel namespace
#define GECODE_VTABLE_EXPORT
const int pos
Position of view.
ViewArray< View > x
Views to branch on.
virtual ViewSel< View > * copy(Space &home, bool shared)=0
Create copy during cloning.
Home class for posting propagators