Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
 ~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.
 
NodeAdjInfonodeInfo (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.
 
EdgeAdjInfopairInfo (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.
 
NodeAdjInfom_nodeInfo
 Array which holds the wspd information for one quadtree node.
 
uint32_t m_numPairs
 Total number of pairs.
 
EdgeAdjInfom_pairs
 Array containing all pairs.
 

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 86 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 52 of file WSPD.h.

◆ maxNumPairs()

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

Returns the maximum number of pairs.

Definition at line 61 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 76 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 73 of file WSPD.h.

◆ numPairs()

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

Returns the total number of pairs.

Definition at line 58 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 55 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 70 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 81 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 98 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 102 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 99 of file WSPD.h.

◆ m_numPairs

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

Total number of pairs.

Definition at line 101 of file WSPD.h.

◆ m_pairs

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

Array containing all pairs.

Definition at line 100 of file WSPD.h.


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