visualnode.cpp
Go to the documentation of this file.
Extent representing shape of a tree at one depth level
Definition visualnode.hh:63
A cursor that marks failed subtrees as hidden.
Definition nodecursor.hh:86
A cursor that computes a tree layout for VisualNodes.
Definition layoutcursor.hh:44
static const int minimalSeparation
Definition visualnode.hh:48
static int getAlpha(const S1 &shape1, int depth1, const S2 &shape2, int depth2)
Compute distance needed between shape1 and shape2.
Definition visualnode.cpp:310
static void merge(Extent *result, const S1 &shape1, int depth1, const S2 &shape2, int depth2, int alpha)
Merge shape1 and shape2 into result with distance alpha.
Definition visualnode.cpp:325
NodeAllocatorBase< VisualNode > NodeAllocator
Definition node.hh:143
Run a cursor over a tree, processing nodes in post-order.
Definition nodevisitor.hh:56
Run a cursor over a tree, processing nodes in pre-order.
Definition nodevisitor.hh:72
void setDepth(int d)
Set depth of the shape to d (must be smaller than original depth).
Definition visualnode.hpp:63
const Space * getWorkingSpace(void) const
Return working space (if present).
Definition spacenode.hpp:112
void acquireSpace(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Acquire working space, either from parent or by recomputation.
Definition spacenode.cpp:156
int getAlternative(const NodeAllocator &na) const
Return alternative number of this node.
Definition spacenode.hpp:169
A cursor that marks all nodes in the tree as not hidden.
Definition nodecursor.hh:104
A cursor that marks all nodes in the tree as not stopping.
Definition nodecursor.hh:117
void unstopAll(const NodeAllocator &na)
Do not stop at any stop node in the subtree of this node.
Definition visualnode.cpp:223
int getPathAlternative(const NodeAllocator &na)
Return the alternative of the child that is on the path (-1 if none).
Definition visualnode.cpp:144
void unPathUp(const NodeAllocator &na)
Set all nodes from the node to the root not to be on the path.
Definition visualnode.cpp:135
void unhideAll(const NodeAllocator &na)
Unhide all nodes in the subtree of this node.
Definition visualnode.cpp:207
void labelBranches(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels in subtree.
Definition visualnode.cpp:166
void computeShape(const NodeAllocator &na)
Compute the shape according to the shapes of the children.
Definition visualnode.cpp:399
void toggleHidden(const NodeAllocator &na)
Toggle whether this node is hidden.
Definition visualnode.cpp:153
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.
Definition visualnode.cpp:284
void labelPath(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels on path to root.
Definition visualnode.cpp:175
void pathUp(const NodeAllocator &na)
Set all nodes from the node to the root to be on the path.
Definition visualnode.cpp:127
void dirtyUp(const NodeAllocator &na)
Mark all nodes up the path to the parent as dirty.
Definition visualnode.cpp:102
void changedStatus(const NodeAllocator &na)
Signal that the status has changed.
Definition visualnode.cpp:230
void layout(const NodeAllocator &na)
Compute layout for the subtree of this node.
Definition visualnode.cpp:113
std::string toolTip(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Return string that is used as a tool tip.
Definition visualnode.cpp:279
void hideFailed(const NodeAllocator &na, bool onlyDirty=false)
Hide all failed subtrees of this node.
Definition visualnode.cpp:159
VisualNode * findNode(const NodeAllocator &na, int x, int y)
Find a node in this subtree at coordinates x, y.
Definition visualnode.cpp:249
bool containsCoordinateAtDepth(int x, int depth)
Check if the x at depth depth lies in this subtree.
Definition visualnode.cpp:233
void setChildrenLayoutDone(bool d)
Mark node whether the layout of the node's children has been completed.
Definition visualnode.hpp:168
void print(const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
Definition core.cpp:687
The Gecode Interactive Search Tool.
Gecode toplevel namespace
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
Definition circuit.cpp:169
