38 namespace Gecode {
namespace Gist {
48 int halfWidth = width / 2;
55 l += deltaL;
r += deltaR;
60 l += delta;
r += delta;
96 if (shape != hidden && shape != leaf)
105 for (
int i=0;
i <=
d;
i++) {
106 Extent currentExtent = (*this)[
i];
107 extent.
l += currentExtent.
l;
108 extent.
r += currentExtent.
r;
119 for (
int i=0;
i<depth();
i++) {
120 lastLeft = lastLeft + (*this)[
i].l;
121 lastRight = lastRight + (*this)[
i].r;
122 bb.left =
std::min(bb.left,lastLeft);
123 bb.right =
std::max(bb.right,lastRight);
134 return getFlag(HIDDEN);
144 if (getStatus() ==
BRANCH && h)
146 else if (getStatus() ==
STOP && !h)
158 return getFlag(DIRTY);
168 return getFlag(CHILDRENLAYOUTDONE);
173 setFlag(CHILDRENLAYOUTDONE, d);
178 return getFlag(MARKED);
188 return getFlag(BOOKMARKED);
193 setFlag(BOOKMARKED, m);
198 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.
Heap heap
The single global heap.
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.
Shape * getShape(void)
Return the shape of this node.
struct Gecode::@519::NNF::@60::@61 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.
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.