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