
#include <treeStrategy_3dTorus_minHops.h>
Public Member Functions | |
| void | partition (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions) |
| Partition the range along the longest dimension into numPartitions parts. | |
Protected Member Functions | |
| void | bisect (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions) |
| Bisect the range along the longest dimension. | |
| void | trisect (const Iterator parent, const Iterator start, const Iterator end, const int numPartitions) |
| Trisect the range along the longest dimension. | |
| int | findMaxSpreadDimension (const Iterator start, const Iterator end) |
| Returns the dimension along which the bounding box of a range of vertices has the longest side. | |
Data Structures | |
| class | lessThan |
| Configure a lessThan functor to compare vertices. More... | |
Definition at line 78 of file treeStrategy_3dTorus_minHops.h.
| void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition | ( | const Iterator | parent, | |
| const Iterator | start, | |||
| const Iterator | end, | |||
| const int | numPartitions | |||
| ) | [inline] |
Partition the range along the longest dimension into numPartitions parts.
Find the number of vertices in the range
If further partitioning is needed and there are vertices left to partition
else, just register the remaining vertex(ices) as a sub-tree
else if there are no vertices left, do nothing
else, if there are vertices remaining but no partitions to put them in
fall through case. Should never get here unless something is wrong
Definition at line 159 of file treeStrategy_3dTorus_minHops.h.
References topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), std::distance(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().
Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), topo::topo::SpanningTreeStrategy_3dTorus_minHops< Iterator, SpanningTreeVertex >::buildNextGen(), topo::topo::SpanningTreeStrategy_3dTorus_minBytesHops< Iterator, SpanningTreeVertex >::buildNextGen(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().
| void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect | ( | const Iterator | parent, | |
| const Iterator | start, | |||
| const Iterator | end, | |||
| const int | numPartitions | |||
| ) | [inline, protected] |
Bisect the range along the longest dimension.
Find the number of vertices in the range
Find the dimension along which to bisect the bounding box
Pin the location of the median element
Bisect the vertex list at the median element
Partition the two pieces as necessary
Definition at line 192 of file treeStrategy_3dTorus_minHops.h.
References advance(), std::distance(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().
Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().
| void topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect | ( | const Iterator | parent, | |
| const Iterator | start, | |||
| const Iterator | end, | |||
| const int | numPartitions | |||
| ) | [inline, protected] |
Trisect the range along the longest dimension.
If the number of partitions left really can be trisected, then do it
Find the number of vertices in the range
Find the dimension along which to bisect the bounding box
Pin the location of the 1/3 and 2/3 elements
Trisect the vertex list at the median element
Partition the three pieces further
else simply call partition to let it handle things
Definition at line 212 of file treeStrategy_3dTorus_minHops.h.
References advance(), std::distance(), topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().
Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::partition().
| int topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::findMaxSpreadDimension | ( | const Iterator | start, | |
| const Iterator | end | |||
| ) | [inline, protected] |
Returns the dimension along which the bounding box of a range of vertices has the longest side.
Find the min and max coordinates along each dimension of the bounding box
Identify the dimension of the maximum spread in coordinates
Definition at line 243 of file treeStrategy_3dTorus_minHops.h.
References abs(), max(), and min().
Referenced by topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::bisect(), and topo::impl::TreeBoundingBoxOn3dTorus< Iterator >::trisect().
1.5.5