Information about a tree node. More...
Public Attributes | |
| Int32 | index = -1 |
| Linear index in the tree. | |
| Int32 | left_child_index = -1 |
| Linear index of the left child (-1 if none). | |
| Int32 | right_child_index = -1 |
| Linear index of the right child (-1 if none). | |
| Int32 | parent_index = -1 |
| Index in the tree of the parent (-1 if none). | |
| Int32 | nb_left_child = -1 |
| Number of children on the left (if not terminal). | |
| Int32 | nb_right_child = -1 |
| Number of children on the right (if not terminal). | |
| Int32 | level = -1 |
| Level in the tree. | |
| Int32 | left_partition_id = -1 |
| Index of the left partition (only for terminal nodes). | |
| Int32 | right_partition_id = -1 |
| Index of the right partition (only for terminal nodes). | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const TreeNode &t) |
Information about a tree node.
A node has 0, 1, or 2 children and 0 or 1 parent. If a node does not have a child on one side, then it is associated with a partition. This means that either left_child_index is valid, or left_partition_id (and the same for the right side).
The partition calculation is done by calling doPartition(). After calculation, it is possible to retrieve the array of nodes via the tree() method. The nodes are stored in an array and can therefore be indexed directly.
Definition at line 176 of file ArcaneGeometricMeshPartitionerService.cc.
|
friend |
Definition at line 199 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::index = -1 |
Linear index in the tree.
Definition at line 179 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::left_child_index = -1 |
Linear index of the left child (-1 if none).
Definition at line 181 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::left_partition_id = -1 |
Index of the left partition (only for terminal nodes).
Definition at line 193 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::level = -1 |
Level in the tree.
Definition at line 191 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::nb_left_child = -1 |
Number of children on the left (if not terminal).
Definition at line 187 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::nb_right_child = -1 |
Number of children on the right (if not terminal).
Definition at line 189 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::parent_index = -1 |
Index in the tree of the parent (-1 if none).
Definition at line 185 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::right_child_index = -1 |
Linear index of the right child (-1 if none).
Definition at line 183 of file ArcaneGeometricMeshPartitionerService.cc.
| Int32 Arcane::BinaryTree::TreeNode::right_partition_id = -1 |
Index of the right partition (only for terminal nodes).
Definition at line 195 of file ArcaneGeometricMeshPartitionerService.cc.