#include <Node.h>
Public Member Functions | |
| Node (int _id) | |
| ~Node () | |
| void | setParent (Node *_parent) |
| Node * | getParent () |
| void | addChild (Node *_child) |
| void | setLevelsForSubTree (int actLevel) |
| void | setBoundariesOfSubTree (float *rootedBoundaries, float *radialBoundaries, float *balloonBoundaries) |
| int | getLevel () |
| void | renderRootedSubTree (float rootX, float rootY, int maxFanOut, int hierarchyDepth) |
| void | renderRadialSubTree (float rootX, float rootY, float rootAngle, int maxFanOut, int hierarchyDepth, unsigned int *nodesPerLevel) |
| float | renderBalloonSubTree (float rootX, float rootY, float rootAngle, float radius, int maxFanOut, int hierarchyDepth) |
| int | getMaximumFanOutOfSubtree () |
| unsigned int | getMaxNodesPerLevelOfSubtree (int hierarchyDepth) |
| unsigned int * | getNodesPerLevelOfSubtree (int hierarchyDepth) |
| void | getNodesPerLevel (unsigned int *nodesPerLevel) |
| int | getChildCount () |
| unsigned int | getMaxDepthOfSubtree () |
| unsigned int | getMinDepthOfSubtree () |
| void | getDepths (std::vector< unsigned int > *depths, unsigned int currentDepth) |
| unsigned int | getNodeCountOfSubtree () |
| unsigned int | getNodeCount (unsigned int nodeCount) |
| void | preComputeRadialSubTree (float rootAngle, unsigned int stopIndex, Node *childFound, bool down, unsigned int *nodesPerLevel) |
| void | computeSiblingsOfSubtree (unsigned int *nodesPerLevel) |
| Node * | getLeftSibling (Node *node, Node *lastNode, bool up) |
| Node * | getRightSibling (Node *node, Node *lastNode, bool up) |
| Node * | getLeftSiblingOfNode (unsigned int *nodesPerLevel) |
| Node * | getRightSiblingOfNode (unsigned int *nodesPerLevel) |
| void | computeSiblingIndex (unsigned int *nextLevelIndices) |
| unsigned int | getSiblingIndex () |
| Node * | getLeftSibling () |
| Node * | getRightSibling () |
| int | getID () |
| float | getRootedTreeX () |
| float | getRootedTreeY () |
| float | getRadialTreeX () |
| float | getRadialTreeY () |
| float | getBalloonTreeX () |
| float | getBalloonTreeY () |
| float | getRadialLeftLimitAngle () |
| float | getRadialRightLimitAngle () |
| float | getRadialLeftBisectorLimitAngle () |
| float | getRadialRightBisectorLimitAngle () |
| float | getRadialAnglePerChild () |
| float | getRadialAngle () |
| void | computeLeftRadialBisectorLimitAngle () |
| void | computeRightRadialBisectorLimitAngle () |
| void | setRadialLeftBisectorLimitAngle (float angle) |
| void | setRadialRightBisectorLimitAngle (float angle) |
| void | setRadialAngle (float angle) |
| void | computeRadialBisectorLimitAngles () |
| bool | getIsLeftestChild () |
| bool | getIsRightestChild () |
| void | setIsLeftestChild (bool value) |
| void | setIsRightestChild (bool value) |
| void | setPreRootedX (float value) |
| void | setPreRootedY (float value) |
| float | getPreRootedX () |
| float | getPreRootedY () |
| float | getPreRootedXTmp () |
| void | preComputeRootedSubTree (bool up, unsigned int stopIndex) |
| Node * | findNodeAtMaxDepth (Node *node, int *maxDepth) |
| float | preComputeBalloonTree (float parentAngle, unsigned int childCountOfParentNode) |
| void | setAngleOfNode (float angle) |
| float | getBalloonRadiusOfNode () |
| float | getBalloonAngleOfNode () |
| void | setNodeVisability (bool visable) |
| void | setLineVisability (bool visable) |
| void | setCircleVisability (bool visable) |
Private Member Functions | |
| void | drawCircle (float x, float y, float z, float radius) |
| void | drawNode (float x, float y, float z, float radius) |
Private Attributes | |
| Node * | parent |
| Node * | leftSibling |
| Node * | rightSibling |
| std::vector< Node * > * | childVector |
| int | level |
| int | id |
| float | rootedTreeX |
| float | rootedTreeY |
| float | radialTreeX |
| float | radialTreeY |
| float | balloonTreeX |
| float | balloonTreeY |
| bool | showNodes |
| bool | showLines |
| bool | showCircles |
| float | balloonRadiusOfNode |
| float | balloonAngleOfNode |
| unsigned int | siblingIndex |
| float | radialLeftLimitAngle |
| float | radialRightLimitAngle |
| float | radialLeftBisectorLimitAngle |
| float | radialRightBisectorLimitAngle |
| float | radialAnglePerChild |
| float | radialAngle |
| bool | isLeftestChild |
| bool | isRightestChild |
| float | preRootedX |
| float | preRootedXTmp |
| float | preRootedY |
Static Private Attributes | |
| static log4cxx::LoggerPtr | logger |
| Node::Node | ( | int | _id | ) |
Constructs a new Node object
| _id | the ID of the node |
| Node::~Node | ( | ) |
Destroys the object
| void Node::addChild | ( | Node * | _child | ) |
| void Node::computeLeftRadialBisectorLimitAngle | ( | ) |
Precomputes the left bisector limit angle of the childs
| void Node::computeRadialBisectorLimitAngles | ( | ) |
Precomputes the left and right bisector limit angles of the childs
| void Node::computeRightRadialBisectorLimitAngle | ( | ) |
Precomputes the right bisector limit angle of the childs
| void Node::computeSiblingIndex | ( | unsigned int * | nextLevelIndices | ) |
Determines the index of the nodes in one hierarchical level
| nextLevelIndices | current indices |
| void Node::computeSiblingsOfSubtree | ( | unsigned int * | nodesPerLevel | ) |
Computes the siblings of the subtree.
| nodesPerLevel | Count of nodes per hierarchical level of the tree |
| void Node::drawCircle | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| float | radius | |||
| ) | [private] |
| x | x-coordinate of the midpoint | |
| y | y-coordinate of the midpoint | |
| z | z-coordinate of the midpoint | |
| radius | radius of the circle |
| void Node::drawNode | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| float | radius | |||
| ) | [private] |
Draws a node as a filled circle at the specified position with the specified radius
| x | x-coordinate of the node | |
| y | y-coordinate of the node | |
| z | z-coordinate of the node | |
| radius | radius of the circle that is drawn |
Returns one node, which has maximal depth
| node | Found node (NULL allowed) | |
| maxDepth | Maximal depth of the found node |
| float Node::getBalloonAngleOfNode | ( | ) |
Returns the angle of the node in the balloon tree
| float Node::getBalloonRadiusOfNode | ( | ) |
Sets the radius of the node in the balloon tree
| float Node::getBalloonTreeX | ( | ) |
Returns the x-coordinate of the node, when the tree is rendered as a Balloon Tree
| float Node::getBalloonTreeY | ( | ) |
Returns the y-coordinate of the node, when the tree is rendered as a Balloon Tree
| int Node::getChildCount | ( | ) |
Returns the number of children of the node
| void Node::getDepths | ( | std::vector< unsigned int > * | depths, | |
| unsigned int | currentDepth | |||
| ) |
Returns all depths of the subtree
| depths | Computed depths | |
| currentDepth | Current depth |
| int Node::getID | ( | ) |
Returns the ID of the node
| bool Node::getIsLeftestChild | ( | ) |
Determines if the child is the leftest one
| bool Node::getIsRightestChild | ( | ) |
Determines if the child is the rightest one
| Node * Node::getLeftSibling | ( | ) |
Returns the left sibling of that node
| Node * Node::getLeftSiblingOfNode | ( | unsigned int * | nodesPerLevel | ) |
Determines the left sibling of the current node
| nodesPerLevel | Count of nodes per hierarchical level of the tree |
| int Node::getLevel | ( | ) |
Returns the level of the node
| unsigned int Node::getMaxDepthOfSubtree | ( | ) |
Determines the maximal depth of the subtree
| int Node::getMaximumFanOutOfSubtree | ( | ) |
Returns the maximum fanout of the subtree, which is the maximum number of childs of every node in the tree
| unsigned int Node::getMaxNodesPerLevelOfSubtree | ( | int | hierarchyDepth | ) |
Returns the maximum of the number of nodes at all levels.
| hierarchyDepth | The maximum hierarchical depth of the tree |
| unsigned int Node::getMinDepthOfSubtree | ( | ) |
Determines the minimal depth of the subtree
| unsigned int Node::getNodeCount | ( | unsigned int | nodeCount | ) |
Call getNodeCountOfSubtree!
| nodeCount | current count of nodes |
| unsigned int Node::getNodeCountOfSubtree | ( | ) |
Determines the number of nodes in that subtree
| void Node::getNodesPerLevel | ( | unsigned int * | nodesPerLevel | ) |
Call getNodesPerLevelOfSubtree!
| nodesPerLevel | Current data structure |
| unsigned int * Node::getNodesPerLevelOfSubtree | ( | int | hierarchyDepth | ) |
Determines the nodes per hierarchical level of the subtree
| hierarchyDepth | Maximum depth of the tree |
| Node * Node::getParent | ( | ) |
Returns a pointer to the parent node
| float Node::getPreRootedX | ( | ) |
Returns the precomputed X-Value of the node when the tree is rendered as Rooted Tree
| float Node::getPreRootedXTmp | ( | ) |
Returns the precomputed X-Value of the node when the tree is rendered as Rooted Tree. It is used for transactions.
| float Node::getPreRootedY | ( | ) |
Returns the precomputed Y-Value of the node when the tree is rendered as Rooted Tree
| float Node::getRadialAngle | ( | ) |
Returns the angle of that node in the radial tree
| float Node::getRadialAnglePerChild | ( | ) |
Returns the angle for each child of that node
| float Node::getRadialLeftBisectorLimitAngle | ( | ) |
Returns the left bisector limit angle of the childs
| float Node::getRadialLeftLimitAngle | ( | ) |
Returns the left limit angle of the childs
| float Node::getRadialRightBisectorLimitAngle | ( | ) |
Returns the right bisector limit angle of the childs
| float Node::getRadialRightLimitAngle | ( | ) |
Returns the right limit angle of the childs
| float Node::getRadialTreeX | ( | ) |
Returns the x-coordinate of the node, when the tree is rendered as a Radial Tree
| float Node::getRadialTreeY | ( | ) |
Returns the y-coordinate of the node, when the tree is rendered as a Radial Tree
| Node * Node::getRightSibling | ( | ) |
Returns the right sibling of that node
| Node * Node::getRightSiblingOfNode | ( | unsigned int * | nodesPerLevel | ) |
Determines the right sibling of the current node
| nodesPerLevel | Count of nodes per hierarchical level of the tree |
| float Node::getRootedTreeX | ( | ) |
Returns the x-coordinate of the node, when the tree is rendered as a Rooted Tree
| float Node::getRootedTreeY | ( | ) |
Returns the y-coordinate of the node, when the tree is rendered as a Rooted Tree
| unsigned int Node::getSiblingIndex | ( | ) |
Returns the index of the nodes in one hierarchical level
| float Node::preComputeBalloonTree | ( | float | parentAngle, | |
| unsigned int | childCountOfParentNode | |||
| ) |
Precomputes the Balloon Tree. The tree is traversed from bottom to top.
| parentAngle | Angle of the parent node | |
| childCountOfParentNode | Number of childs of the parent node |
| void Node::preComputeRadialSubTree | ( | float | rootAngle, | |
| unsigned int | stopIndex, | |||
| Node * | childFound, | |||
| bool | down, | |||
| unsigned int * | nodesPerLevel | |||
| ) |
Renders the whole subtree as a Rooted Tree
| rootX | the x-coordiante of the current node representing the root of the subtree | |
| rootY | the y-coordiante of the current node representing the root of the subtree | |
| maxFanOut | the maximum number of childs for each node in the whole tree | |
| hierarchyDepth | Number of levels of the tree Precomputes the radial tree and the rooted tree. The tree is traversed from right to left and from the root node to the nodes at the bottom level. | |
| rootAngle | Root angle of the root node | |
| stopIndex | siblingIndex to step traversing the siblings | |
| childFound | One child of the hierarchy level, or NULL if no one was found until now. Used for getting down in the hierarchy. | |
| down | True if the last iteration was a step down in the hierarchy, false otherwise | |
| nodesPerLevel | Count of Nodes per level of the tree |
| void Node::preComputeRootedSubTree | ( | bool | up, | |
| unsigned int | stopIndex | |||
| ) |
Improves the rooted tree. Actually the rooted tree is already precomputed in the preComputeRadialSubTree-function This function must be called from one node at the maximum depth. The tree is traversed from right to left and from bottom to top. This function tries to center the nodes. If the order of the sibling nodes at a hierarchical level gets mixed up, all nodes at that hierarchical level are reseted to the original values.
| up | Determines if the last step was one up in the hierarchy | |
| stopIndex | siblingIndex to stop traversing the sibling nodes |
| float Node::renderBalloonSubTree | ( | float | rootX, | |
| float | rootY, | |||
| float | rootAngle, | |||
| float | radius, | |||
| int | maxFanOut, | |||
| int | hierarchyDepth | |||
| ) |
Renders the whole subtree as a Balloon Tree
| rootX | the x-coordiante of the current node representing the root of the subtree | |
| rootY | the y-coordiante of the current node representing the root of the subtree | |
| rootAngle | The angle of the root node | |
| radius | The current radius | |
| maxFanOut | the maximum number of childs for each node in the whole tree | |
| hierarchyDepth | Number of levels of the tree |
| void Node::renderRadialSubTree | ( | float | rootX, | |
| float | rootY, | |||
| float | rootAngle, | |||
| int | maxFanOut, | |||
| int | hierarchyDepth, | |||
| unsigned int * | nodesPerLevel | |||
| ) |
Renders the whole subtree as a Radial Tree
| rootX | the x-coordiante of the current node representing the root of the subtree | |
| rootY | the y-coordiante of the current node representing the root of the subtree | |
| rootAngle | Root angle | |
| maxFanOut | the maximum number of childs for each node in the whole tree | |
| hierarchyDepth | Number of levels of the tree | |
| nodesPerLevel | Count of Nodes per level of the tree |
| void Node::renderRootedSubTree | ( | float | rootX, | |
| float | rootY, | |||
| int | maxFanOut, | |||
| int | hierarchyDepth | |||
| ) |
Renders the whole subtree as a Rooted Tree
| rootX | the x-coordiante of the current node representing the root of the subtree | |
| rootY | the y-coordiante of the current node representing the root of the subtree | |
| maxFanOut | the maximum number of childs for each node in the whole tree | |
| hierarchyDepth | Number of levels of the tree |
| void Node::setAngleOfNode | ( | float | angle | ) |
Sets the angle of the node in the balloon tree
| angle | Angle of the node |
| void Node::setBoundariesOfSubTree | ( | float * | rootedBoundaries, | |
| float * | radialBoundaries, | |||
| float * | balloonBoundaries | |||
| ) |
Sets the boundaries of the subtree
| rootedBoundaries | pointer to an array to store the boundaries of the Rooted Tree in the form xMin, yMin, xMax, yMax | |
| radialBoundaries | pointer to an array to store the boundaries of the Radial Tree in the form xMin, yMin, xMax, yMax | |
| balloonBoundaries | pointer to an array to store the boundaries of the Balloon Tree in the form xMin, yMin, xMax, yMax |
| void Node::setCircleVisability | ( | bool | visable | ) |
Sets a boolean value indicating whether the hierarchy circles should be rendered or not
| visable | a boolean value indicating whether the hierarchy circles should be rendered or not |
| void Node::setIsLeftestChild | ( | bool | value | ) |
Sets if the child is the leftest one
| value | True if the child is the leftest one, false otherwise |
| void Node::setIsRightestChild | ( | bool | value | ) |
Sets if the child is the rightest one
| value | True if the child is the rightest one, false otherwise |
| void Node::setLevelsForSubTree | ( | int | actLevel | ) |
Sets the level for each node in the whole subtree starting with actLevel at the root
| actLevel | the level of the current node representing the root of the subtree |
| void Node::setLineVisability | ( | bool | visable | ) |
Sets a boolean value indicating whether the hierarchy lines should be rendered or not
| visable | a boolean value indicating whether the hierarchy lines should be rendered or not |
| void Node::setNodeVisability | ( | bool | visable | ) |
Sets a boolean value indicating whether the nodes should be rendered or not
| visable | a boolean value indicating whether the nodes should be rendered or not |
| void Node::setParent | ( | Node * | _parent | ) |
Sets the pointer to the parent node
| _parent | pointer to the parent node |
| void Node::setPreRootedX | ( | float | value | ) |
Sets the precomputed X-Value of the node when the tree is rendered as Rooted Tree
| value | Precomputed X-Value of the node when the tree is rendered as Rooted Tree |
| void Node::setPreRootedY | ( | float | value | ) |
Sets the precomputed Y-Value of the node when the tree is rendered as Rooted Tree
| value | Precomputed Y-Value of the node when the tree is rendered as Rooted Tree |
| void Node::setRadialAngle | ( | float | angle | ) |
Sets the angle of that node in the radial tree
| angle | The angle of that node in the radial tree |
| void Node::setRadialLeftBisectorLimitAngle | ( | float | angle | ) |
Sets the left bisector limit angle of the childs
| angle | Left bisector limit angle of the childs |
| void Node::setRadialRightBisectorLimitAngle | ( | float | angle | ) |
Sets the right bisector limit angle of the childs
| angle | right bisector limit angle of the childs |
float Node::balloonAngleOfNode [private] |
Angle of the node in the balloon tree
float Node::balloonRadiusOfNode [private] |
Radius of the node in the balloon tree
float Node::balloonTreeX [private] |
X-Value of the node when the tree is rendered as Balloon Tree
float Node::balloonTreeY [private] |
Y-Value of the node when the tree is rendered as Balloon Tree
std::vector<Node*>* Node::childVector [private] |
Pointer to a vector with pointers to Node objects representing the childs of the node
int Node::id [private] |
ID of the node
bool Node::isLeftestChild [private] |
Determines if the child is the leftest one
bool Node::isRightestChild [private] |
Determines if the child is the rightest one
Node* Node::leftSibling [private] |
Pointer to the left sibling node
int Node::level [private] |
Level of the node, the root has level 0
LoggerPtr Node::logger [static, private] |
Node* Node::parent [private] |
Pointer to the parent node
float Node::preRootedX [private] |
Precomputed X-Value of the node when the tree is rendered as Rooted Tree
float Node::preRootedXTmp [private] |
Precomputed X-Value of the node when the tree is rendered as Rooted Tree. It is used for transactions.
float Node::preRootedY [private] |
Precomputed Y-Value of the node when the tree is rendered as Rooted Tree
float Node::radialAngle [private] |
Angle of that node in the radial tree
float Node::radialAnglePerChild [private] |
Angle for each child of that node
float Node::radialLeftBisectorLimitAngle [private] |
The left bisector limit angle of the childs
float Node::radialLeftLimitAngle [private] |
The left limit angle of the childs
float Node::radialRightBisectorLimitAngle [private] |
The right bisector limit angle of the childs
float Node::radialRightLimitAngle [private] |
The right limit angle of the childs
float Node::radialTreeX [private] |
X-Value of the node when the tree is rendered as Radial Tree
float Node::radialTreeY [private] |
Y-Value of the node when the tree is rendered as Radial Tree
Node* Node::rightSibling [private] |
Pointer to the right sibling node
float Node::rootedTreeX [private] |
X-Value of the node when the tree is rendered as Rooted Tree
float Node::rootedTreeY [private] |
Y-Value of the node when the tree is rendered as Rooted Tree
bool Node::showCircles [private] |
Boolean value indicating whether the hierarchy circles should be rendered or not
bool Node::showLines [private] |
Boolean value indicating whether the hierarchy lines should be rendered or not
bool Node::showNodes [private] |
Boolean value indicating whether the nodes should be rendered or not
unsigned int Node::siblingIndex [private] |
Index of the nodes in one hierarchical level
1.5.7.1