Class for the Well-Separated-Pairs-Decomposition (WSPD) More...
#include <ogdf/energybased/fast_multipole_embedder/WSPD.h>
Public Types | |
using | NodeID = LinearQuadtree::NodeID |
Public Member Functions | |
WSPD (uint32_t maxNumNodes) | |
Constructor. Allocates the memory via OGDF_MALLOC_16. | |
~WSPD () | |
Destructor. Deallocates via OGDF_FREE_16. | |
void | addWSP (NodeID a, NodeID b) |
Adds a well separated pair (a , b ) | |
void | clear () |
Resets the array m_nodeInfo. | |
uint32_t | firstPairEntry (NodeID nodeID) const |
Returns the index of the first pair of node nodeID . | |
uint32_t | maxNumNodes () const |
Returns the maximum number of nodes. Equals the maximum number of nodes in the LinearQuadtree. | |
uint32_t | maxNumPairs () const |
Returns the maximum number of pairs. | |
uint32_t | nextPair (uint32_t currPairIndex, NodeID a) const |
Returns the index of the next pair of currPairIndex of the node with index a . | |
NodeAdjInfo & | nodeInfo (NodeID nodeID) const |
Returns the node info for index nodeID . | |
uint32_t | numPairs () const |
Returns the total number of pairs. | |
uint32_t | numWSNodes (NodeID a) const |
Returns the number of well separated nodes for node a . | |
EdgeAdjInfo & | pairInfo (uint32_t pairIndex) const |
Returns the pair info for index pairIndex . | |
unsigned long | sizeInBytes () const |
uint32_t | wsNodeOfPair (uint32_t currPairIndex, NodeID a) const |
Returns the other node (not a ) of the pair with index currPairIndex . | |
Private Member Functions | |
void | allocate () |
Allocates all memory. | |
void | deallocate () |
Releases all memory. | |
Private Attributes | |
uint32_t | m_maxNumNodes |
Maximum number of nodes. | |
uint32_t | m_maxNumPairs |
Upper bound for the number of pairs. | |
NodeAdjInfo * | m_nodeInfo |
Array which holds the wspd information for one quadtree node. | |
uint32_t | m_numPairs |
Total number of pairs. | |
EdgeAdjInfo * | m_pairs |
Array containing all pairs. | |
|
explicit |
Constructor. Allocates the memory via OGDF_MALLOC_16.
ogdf::fast_multipole_embedder::WSPD::~WSPD | ( | ) |
Destructor. Deallocates via OGDF_FREE_16.
Adds a well separated pair (a
, b
)
|
private |
Allocates all memory.
void ogdf::fast_multipole_embedder::WSPD::clear | ( | ) |
Resets the array m_nodeInfo.
|
private |
Releases all memory.
|
inline |
Returns the maximum number of nodes. Equals the maximum number of nodes in the LinearQuadtree.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |