38 #ifndef GECODE_GIST_VISUALNODE_HH
39 #define GECODE_GIST_VISUALNODE_HH
45 namespace Gecode {
namespace Gist {
81 void extend(
int deltaL,
int deltaR);
113 int depth(
void)
const;
bool isOnPath(void)
Return whether node is on the path.
std::string toolTip(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Return string that is used as a tool tip.
void unhideAll(const NodeAllocator &na)
Unhide all nodes in the subtree of this node.
int right
Right coordinate.
void labelPath(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels on path to root.
void setOnPath(bool onPath0)
Set whether node is on the path.
void setMarked(bool m)
Set mark of this node.
void dispose(void)
Free allocated memory.
Static reference to the currently best space.
void computeBoundingBox(void)
Compute bounding box.
bool isDirty(void)
Return whether node is marked as dirty.
void layout(const NodeAllocator &na)
Compute layout for the subtree of this node.
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.
int offset
Relative offset from the parent node.
static const int LASTBIT
Last bit used for SpaceNode flags.
void setHidden(bool h)
Set hidden state to h.
static Shape * allocate(int d)
Construct shape of depth d.
void toggleStop(const NodeAllocator &na)
Do not stop at this node.
void setBookmarked(bool m)
Set bookmark of this node.
std::string getBranchLabel(NodeAllocator &na, VisualNode *p, const Choice *c, BestNode *curBest, int c_d, int a_d, int alt)
Return string that describes the branch.
void labelBranches(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels in subtree.
Gecode::FloatVal c(-8, 8)
void unstopAll(const NodeAllocator &na)
Do not stop at any stop node in the subtree of this node.
bool getExtentAtDepth(int depth, Extent &extent)
Return if extent exists at depth, if yes return it in extent.
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.
const unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance) ...
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.
int getPathAlternative(const NodeAllocator &na)
Return the alternative of the child that is on the path (-1 if none)
VisualNodeFlags
Flags for VisualNodes.
void changedStatus(const NodeAllocator &na)
Signal that the status has changed.
Shape * getShape(void)
Return the shape of this node.
int depth(void) const
Return depth of the shape.
bool childrenLayoutIsDone(void)
Return whether the layout of the node's children has been completed.
Node * x
Pointer to corresponding Boolean expression node.
Choice for performing commit
Extent(void)
Default constructor.
void dirtyUp(const NodeAllocator &na)
Mark all nodes up the path to the parent as dirty.
bool isMarked(void)
Return whether node is marked.
static Shape * hidden
Static shape for hidden nodes.
Shape * shape
Shape of this node.
void toggleHidden(const NodeAllocator &na)
Toggle whether this node is hidden.
bool isBookmarked(void)
Return whether node is bookmarked.
const BoundingBox & getBoundingBox(void) const
Return bounding box.
BoundingBox(void)
Default constructor.
void unPathUp(const NodeAllocator &na)
Set all nodes from the node to the root not to be on the path.
Node class that supports visual layout
int getOffset(void)
Return offset off this node from its parent.
const Extent & operator[](int i) const
Return extent at depth i.
VisualNode * findNode(const NodeAllocator &na, int x, int y)
Find a node in this subtree at coordinates x, y.
VisualNode(int p)
Construct with parent p.
const unsigned int c_d
Create a clone after every c_d commits (commit distance)
void computeShape(const NodeAllocator &na, VisualNode *root)
Compute the shape according to the shapes of the children.
static void deallocate(Shape *)
A node of a search tree of Gecode spaces.
void pathUp(const NodeAllocator &na)
Set all nodes from the node to the root to be on the path.
static Shape * leaf
Static shape for leaf nodes.
Gecode toplevel namespace
void setDepth(int d)
Set depth of the shape to d (must be smaller than original depth)
bool containsCoordinateAtDepth(int x, int depth)
Check if the x at depth depth lies in this subtree.
void setShape(Shape *s)
Set the shape of this node.
Extent representing shape of a tree at one depth level
static const int minimalSeparation
void hideFailed(const NodeAllocator &na, bool onlyDirty=false)
Hide all failed subtrees of this node.