Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::OrderComparer Class Reference

#include <ogdf/upward/LayerBasedUPRLayout.h>

Public Member Functions

 OrderComparer (const UpwardPlanRep &_UPR, Hierarchy &_H)
 
bool less (node vH1, node vH2) const
 Returns true iff vH1 and vH2 are placed on the same layer and node vH1 has to drawn on the left-hand side of vH2 (according to m_UPR) More...
 

Private Member Functions

bool checkUp (node vUPR, int level) const
 Returns true iff there is a node above vUPR with rank level or lower. More...
 
void dfs_LR (edge e, NodeArray< bool > &visited, NodeArray< int > &dfsNum, int &num)
 Traverses with dfs using edge order from left to right and compute the dfs number. More...
 
bool left (edge e1UPR, edge e2UPR) const
 Returns true iff vUPR1 is on the left-hand side of vUPR2 according to m_UPR. More...
 
bool left (List< edge > &chain1, List< edge > &chain2, int level) const
 Returns true iff vUPR1 is on the left-hand side of vUPR2 according to m_UPR. More...
 
bool left (node vUPR1, const List< edge > &chain1, node vUPR2, const List< edge > &chain2) const
 Returns true if vUPR1 is on the left-hand side of vUPR2 according to m_UPR. More...
 

Private Attributes

NodeArray< bool > crossed
 
HierarchyH
 
NodeArray< int > m_dfsNum
 
const UpwardPlanRepm_UPR
 

Detailed Description

Definition at line 46 of file LayerBasedUPRLayout.h.

Constructor & Destructor Documentation

◆ OrderComparer()

ogdf::OrderComparer::OrderComparer ( const UpwardPlanRep _UPR,
Hierarchy _H 
)

Member Function Documentation

◆ checkUp()

bool ogdf::OrderComparer::checkUp ( node  vUPR,
int  level 
) const
private

Returns true iff there is a node above vUPR with rank level or lower.

◆ dfs_LR()

void ogdf::OrderComparer::dfs_LR ( edge  e,
NodeArray< bool > &  visited,
NodeArray< int > &  dfsNum,
int &  num 
)
private

Traverses with dfs using edge order from left to right and compute the dfs number.

◆ left() [1/3]

bool ogdf::OrderComparer::left ( edge  e1UPR,
edge  e2UPR 
) const
private

Returns true iff vUPR1 is on the left-hand side of vUPR2 according to m_UPR.

Precondition
source or target of both edges must be identical

◆ left() [2/3]

bool ogdf::OrderComparer::left ( List< edge > &  chain1,
List< edge > &  chain2,
int  level 
) const
private

Returns true iff vUPR1 is on the left-hand side of vUPR2 according to m_UPR.

Used only by method less for the case when both node vH1 and vH2 are long-edge dummies, where level is the current level of the long-edge dummies

◆ left() [3/3]

bool ogdf::OrderComparer::left ( node  vUPR1,
const List< edge > &  chain1,
node  vUPR2,
const List< edge > &  chain2 
) const
private

Returns true if vUPR1 is on the left-hand side of vUPR2 according to m_UPR.

Parameters
vUPR1the node that is tested to be on the left-hand side
chain1if vUPR1 is associated with a long edge dummy vH1, then chain1 contain vH1
vUPR2the other node
chain2if vUPR2 is associated with a long edge dummy vH2, then chain2 contain vH2

◆ less()

bool ogdf::OrderComparer::less ( node  vH1,
node  vH2 
) const

Returns true iff vH1 and vH2 are placed on the same layer and node vH1 has to drawn on the left-hand side of vH2 (according to m_UPR)

Member Data Documentation

◆ crossed

NodeArray<bool> ogdf::OrderComparer::crossed
mutableprivate

Definition at line 65 of file LayerBasedUPRLayout.h.

◆ H

Hierarchy& ogdf::OrderComparer::H
private

Definition at line 60 of file LayerBasedUPRLayout.h.

◆ m_dfsNum

NodeArray<int> ogdf::OrderComparer::m_dfsNum
private

Definition at line 61 of file LayerBasedUPRLayout.h.

◆ m_UPR

const UpwardPlanRep& ogdf::OrderComparer::m_UPR
private

Definition at line 59 of file LayerBasedUPRLayout.h.


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