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