Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::fast_multipole_embedder::WSPD Class Reference

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. More...
 
 ~WSPD ()
 Destructor. Deallocates via OGDF_FREE_16. More...
 
void addWSP (NodeID a, NodeID b)
 Adds a well separated pair (a, b) More...
 
void clear ()
 Resets the array m_nodeInfo. More...
 
uint32_t firstPairEntry (NodeID nodeID) const
 Returns the index of the first pair of node nodeID. More...
 
uint32_t maxNumNodes () const
 Returns the maximum number of nodes. Equals the maximum number of nodes in the LinearQuadtree. More...
 
uint32_t maxNumPairs () const
 Returns the maximum number of pairs. More...
 
uint32_t nextPair (uint32_t currPairIndex, NodeID a) const
 Returns the index of the next pair of currPairIndex of the node with index a. More...
 
NodeAdjInfonodeInfo (NodeID nodeID) const
 Returns the node info for index nodeID. More...
 
uint32_t numPairs () const
 Returns the total number of pairs. More...
 
uint32_t numWSNodes (NodeID a) const
 Returns the number of well separated nodes for node a. More...
 
EdgeAdjInfopairInfo (uint32_t pairIndex) const
 Returns the pair info for index pairIndex. More...
 
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. More...
 

Private Member Functions

void allocate ()
 Allocates all memory. More...
 
void deallocate ()
 Releases all memory. More...
 

Private Attributes

uint32_t m_maxNumNodes
 Maximum number of nodes. More...
 
uint32_t m_maxNumPairs
 Upper bound for the number of pairs. More...
 
NodeAdjInfom_nodeInfo
 Array which holds the wspd information for one quadtree node. More...
 
uint32_t m_numPairs
 Total number of pairs. More...
 
EdgeAdjInfom_pairs
 Array containing all pairs. More...
 

Detailed Description

Class for the Well-Separated-Pairs-Decomposition (WSPD)

Definition at line 41 of file WSPD.h.

Member Typedef Documentation

◆ NodeID

Constructor & Destructor Documentation

◆ WSPD()

ogdf::fast_multipole_embedder::WSPD::WSPD ( uint32_t  maxNumNodes)
explicit

Constructor. Allocates the memory via OGDF_MALLOC_16.

◆ ~WSPD()

ogdf::fast_multipole_embedder::WSPD::~WSPD ( )

Destructor. Deallocates via OGDF_FREE_16.

Member Function Documentation

◆ addWSP()

void ogdf::fast_multipole_embedder::WSPD::addWSP ( NodeID  a,
NodeID  b 
)

Adds a well separated pair (a, b)

◆ allocate()

void ogdf::fast_multipole_embedder::WSPD::allocate ( )
private

Allocates all memory.

◆ clear()

void ogdf::fast_multipole_embedder::WSPD::clear ( )

Resets the array m_nodeInfo.

◆ deallocate()

void ogdf::fast_multipole_embedder::WSPD::deallocate ( )
private

Releases all memory.

◆ firstPairEntry()

uint32_t ogdf::fast_multipole_embedder::WSPD::firstPairEntry ( NodeID  nodeID) const
inline

Returns the index of the first pair of node nodeID.

Definition at line 107 of file WSPD.h.

◆ maxNumNodes()

uint32_t ogdf::fast_multipole_embedder::WSPD::maxNumNodes ( ) const
inline

Returns the maximum number of nodes. Equals the maximum number of nodes in the LinearQuadtree.

Definition at line 53 of file WSPD.h.

◆ maxNumPairs()

uint32_t ogdf::fast_multipole_embedder::WSPD::maxNumPairs ( ) const
inline

Returns the maximum number of pairs.

Definition at line 71 of file WSPD.h.

◆ nextPair()

uint32_t ogdf::fast_multipole_embedder::WSPD::nextPair ( uint32_t  currPairIndex,
NodeID  a 
) const
inline

Returns the index of the next pair of currPairIndex of the node with index a.

Definition at line 95 of file WSPD.h.

◆ nodeInfo()

NodeAdjInfo& ogdf::fast_multipole_embedder::WSPD::nodeInfo ( NodeID  nodeID) const
inline

Returns the node info for index nodeID.

Definition at line 89 of file WSPD.h.

◆ numPairs()

uint32_t ogdf::fast_multipole_embedder::WSPD::numPairs ( ) const
inline

Returns the total number of pairs.

Definition at line 65 of file WSPD.h.

◆ numWSNodes()

uint32_t ogdf::fast_multipole_embedder::WSPD::numWSNodes ( NodeID  a) const
inline

Returns the number of well separated nodes for node a.

Definition at line 59 of file WSPD.h.

◆ pairInfo()

EdgeAdjInfo& ogdf::fast_multipole_embedder::WSPD::pairInfo ( uint32_t  pairIndex) const
inline

Returns the pair info for index pairIndex.

Definition at line 83 of file WSPD.h.

◆ sizeInBytes()

unsigned long ogdf::fast_multipole_embedder::WSPD::sizeInBytes ( ) const

◆ wsNodeOfPair()

uint32_t ogdf::fast_multipole_embedder::WSPD::wsNodeOfPair ( uint32_t  currPairIndex,
NodeID  a 
) const
inline

Returns the other node (not a) of the pair with index currPairIndex.

Definition at line 101 of file WSPD.h.

Member Data Documentation

◆ m_maxNumNodes

uint32_t ogdf::fast_multipole_embedder::WSPD::m_maxNumNodes
private

Maximum number of nodes.

Definition at line 122 of file WSPD.h.

◆ m_maxNumPairs

uint32_t ogdf::fast_multipole_embedder::WSPD::m_maxNumPairs
private

Upper bound for the number of pairs.

Definition at line 126 of file WSPD.h.

◆ m_nodeInfo

NodeAdjInfo* ogdf::fast_multipole_embedder::WSPD::m_nodeInfo
private

Array which holds the wspd information for one quadtree node.

Definition at line 123 of file WSPD.h.

◆ m_numPairs

uint32_t ogdf::fast_multipole_embedder::WSPD::m_numPairs
private

Total number of pairs.

Definition at line 125 of file WSPD.h.

◆ m_pairs

EdgeAdjInfo* ogdf::fast_multipole_embedder::WSPD::m_pairs
private

Array containing all pairs.

Definition at line 124 of file WSPD.h.


The documentation for this class was generated from the following file: