34 namespace Gecode {
namespace Gist {
44 int halfWidth = width / 2;
51 l += deltaL;
r += deltaR;
56 l += delta;
r += delta;
92 if (shape != hidden && shape != leaf)
101 for (
int i=0;
i <=
d;
i++) {
102 Extent currentExtent = (*this)[
i];
103 extent.
l += currentExtent.
l;
104 extent.
r += currentExtent.
r;
115 for (
int i=0;
i<depth();
i++) {
116 lastLeft = lastLeft + (*this)[
i].l;
117 lastRight = lastRight + (*this)[
i].r;
118 bb.left =
std::min(bb.left,lastLeft);
119 bb.right =
std::max(bb.right,lastRight);
130 return getFlag(HIDDEN);
140 if (getStatus() ==
BRANCH && h)
142 else if (getStatus() ==
STOP && !h)
154 return getFlag(DIRTY);
164 return getFlag(CHILDRENLAYOUTDONE);
169 setFlag(CHILDRENLAYOUTDONE, d);
174 return getFlag(MARKED);
184 return getFlag(BOOKMARKED);
189 setFlag(BOOKMARKED, m);
194 return getFlag(ONPATH);
bool isOnPath(void)
Return whether node is on the path.
Node representing stop point.
void setOnPath(bool onPath0)
Set whether node is on the path.
void setMarked(bool m)
Set mark of this node.
const FloatNum max
Largest allowed float value.
Node representing a branch.
void rfree(void *p)
Free memory block starting at p.
void computeBoundingBox(void)
Compute bounding box.
bool isDirty(void)
Return whether node is marked as dirty.
BoundingBox getBoundingBox(void)
Return the bounding box.
bool isHidden(void)
Return if node is hidden.
void setChildrenLayoutDone(bool d)
Mark node whether the layout of the node's children has been completed.
void setStop(bool h)
Set stop state to h.
void setDirty(bool d)
Mark node as dirty.
void * ralloc(size_t s)
Allocate s bytes from heap.
void setHidden(bool h)
Set hidden state to h.
static Shape * allocate(int d)
Construct shape of depth d.
void setBookmarked(bool m)
Set bookmark of this node.
bool getExtentAtDepth(int depth, Extent &extent)
Return if extent exists at depth, if yes return it in extent.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
const Extent & operator[](int i) const
Return extent at depth i.
void extend(int deltaL, int deltaR)
Extend extent by deltaL and deltaR.
void setOffset(int n)
Set offset of this node, relative to its parent.
void move(int delta)
Move extent by delta.
const BoundingBox & getBoundingBox(void) const
Return bounding box.
Post propagator for SetVar SetOpType SetVar SetRelType r
Shape * getShape(void)
Return the shape of this node.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
bool childrenLayoutIsDone(void)
Return whether the layout of the node's children has been completed.
Extent(void)
Default constructor.
bool isMarked(void)
Return whether node is marked.
static Shape * hidden
Static shape for hidden nodes.
bool isBookmarked(void)
Return whether node is bookmarked.
Heap heap
The single global heap.
int getOffset(void)
Return offset off this node from its parent.
static void deallocate(Shape *)
Gecode toplevel namespace
void setDepth(int d)
Set depth of the shape to d (must be smaller than original depth)
Extent representing shape of a tree at one depth level
int depth(void) const
Return depth of the shape.
Node representing ignored stop point.