Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::booth_lueker::PlanarPQTree Class Reference

#include <ogdf/planarity/booth_lueker/PlanarPQTree.h>

+ Inheritance diagram for ogdf::booth_lueker::PlanarPQTree:

Public Member Functions

 PlanarPQTree ()
 
virtual ~PlanarPQTree ()
 
virtual void emptyAllPertinentNodes () override
 Does a clean up after a reduction. More...
 
virtual int Initialize (SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
 Initializes a new PQ-tree with a set of leaves. More...
 
int Initialize (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
 
virtual bool Reduction (SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
 Reduces a set of leaves. More...
 
bool Reduction (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
 
void ReplaceRoot (SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
 Replaces the pertinent subtree by a set of new leaves. More...
 
- Public Member Functions inherited from ogdf::PQTree< edge, IndInfo *, bool >
 PQTree ()
 
virtual ~PQTree ()
 Destructor. More...
 
bool addNewLeavesToTree (PQInternalNode< edge, IndInfo *, bool > *father, SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Adds a set of elements to the already existing set of elements of a PQ-tree. More...
 
virtual void CleanNode (PQNode< edge, IndInfo *, bool > *)
 
virtual void Cleanup ()
 Removes the entire PQ-tree. More...
 
virtual void clientDefinedEmptyNode (PQNode< edge, IndInfo *, bool > *nodePtr)
 If the user wishes to use different flags in a derived class of PQTree that are not available in this implementation, he can overload this function to make a valid cleanup of the nodes. More...
 
void emptyNode (PQNode< edge, IndInfo *, bool > *nodePtr)
 Cleans up all stacks, flags and pointers of a pertinent node that has been visited during the reduction process. More...
 
virtual void front (PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Returns the keys stored in the leaves of the front of nodePtr. More...
 
virtual int Initialize (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Initializes the PQ-tree with a set of elements. More...
 
virtual bool Reduction (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Tests whether permissible permutations of the elements of U exist such that the elements of a subset S of U, stored in leafKeys, form a consecutive sequence. More...
 
PQNode< edge, IndInfo *, bool > * root () const
 Returns a pointer of the root node of the PQTree. More...
 
void writeGML (const char *fileName)
 The function writeGML() prints the PQ-tree in the GML fileformat. More...
 
void writeGML (std::ostream &os)
 

Private Member Functions

void ReplaceFullRoot (SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
 Replaces a pertinet subtree by a set of new leaves if the root is full. More...
 
void ReplacePartialRoot (SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
 Replaces a pertinet subtree by a set of new leaves if the root is partial. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ogdf::PQTree< edge, IndInfo *, bool >
virtual bool addNodeToNewParent (PQNode< edge, IndInfo *, bool > *parent, PQNode< edge, IndInfo *, bool > *child)
 Adds a node child as a child to another node specified in parent. More...
 
virtual bool addNodeToNewParent (PQNode< edge, IndInfo *, bool > *parent, PQNode< edge, IndInfo *, bool > *child, PQNode< edge, IndInfo *, bool > *leftBrother, PQNode< edge, IndInfo *, bool > *rightBrother)
 Adds a node child to the children of another node specified in parent. More...
 
virtual bool Bubble (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Realizes a function described in [Booth]. More...
 
virtual bool checkIfOnlyChild (PQNode< edge, IndInfo *, bool > *child, PQNode< edge, IndInfo *, bool > *parent)
 Checks if child is the only child of parent. More...
 
virtual PQNode< edge, IndInfo *, bool > * clientLeftEndmost (PQNode< edge, IndInfo *, bool > *nodePtr) const
 
virtual PQNode< edge, IndInfo *, bool > * clientNextSib (PQNode< edge, IndInfo *, bool > *nodePtr, PQNode< edge, IndInfo *, bool > *other) const
 
virtual int clientPrintNodeCategorie (PQNode< edge, IndInfo *, bool > *nodePtr)
 If the user wishes to use different flags in a derived class of PQTree that are not available in this implementation, he can overload this function. More...
 
virtual const char * clientPrintStatus (PQNode< edge, IndInfo *, bool > *nodePtr)
 If the user wishes to use different status in a derived class of PQTree that are not available in this implementation, he can overload this function. More...
 
virtual const char * clientPrintType (PQNode< edge, IndInfo *, bool > *nodePtr)
 If the user wishes to use different types in a derived class of PQTree that are not available in this implementation, he can overload this function. More...
 
virtual PQNode< edge, IndInfo *, bool > * clientRightEndmost (PQNode< edge, IndInfo *, bool > *nodePtr) const
 
virtual PQNode< edge, IndInfo *, bool > * clientSibLeft (PQNode< edge, IndInfo *, bool > *nodePtr) const
 
virtual PQNode< edge, IndInfo *, bool > * clientSibRight (PQNode< edge, IndInfo *, bool > *nodePtr) const
 
virtual void destroyNode (PQNode< edge, IndInfo *, bool > *nodePtr)
 Marks a node as PQNodeRoot::PQNodeStatus::ToBeDeleted. More...
 
virtual void exchangeNodes (PQNode< edge, IndInfo *, bool > *oldNode, PQNode< edge, IndInfo *, bool > *newNode)
 Replaces the oldNode by the newNode in the tree. More...
 
List< PQNode< edge, IndInfo *, bool > * > * fullChildren (PQNode< edge, IndInfo *, bool > *nodePtr)
 
virtual void linkChildrenOfQnode (PQNode< edge, IndInfo *, bool > *installed, PQNode< edge, IndInfo *, bool > *newChild)
 Links the two endmost children of two different Q-nodes via their sibling pointers together. More...
 
List< PQNode< edge, IndInfo *, bool > * > * partialChildren (PQNode< edge, IndInfo *, bool > *nodePtr)
 
virtual bool Reduce (SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys)
 Performs the reduction of the pertinent leaves with the help of the template matchings, designed by Booth and Lueker. More...
 
virtual void removeChildFromSiblings (PQNode< edge, IndInfo *, bool > *nodePtr)
 Removes the node nodePtr from the doubly linked list of its parent. More...
 
virtual int removeNodeFromTree (PQNode< edge, IndInfo *, bool > *parent, PQNode< edge, IndInfo *, bool > *child)
 The objective is to remove a node child from the PQ-tree. More...
 
virtual bool templateL1 (PQNode< edge, IndInfo *, bool > *nodePtr, bool isRoot)
 Template matching for leaves. More...
 
virtual bool templateP1 (PQNode< edge, IndInfo *, bool > *nodePtr, bool isRoot)
 Template matching for P-nodes with only full children. More...
 
virtual bool templateP2 (PQNode< edge, IndInfo *, bool > **nodePtr)
 Template matching for a P-node with full and empty children that is the root of the pertinent subtree. More...
 
virtual bool templateP3 (PQNode< edge, IndInfo *, bool > *nodePtr)
 Template matching for a P-node with full and empty children that is not the root of the pertinent subtree. More...
 
virtual bool templateP4 (PQNode< edge, IndInfo *, bool > **nodePtr)
 Template matching for a P-node with full, empty and exactly one partial children. More...
 
virtual bool templateP5 (PQNode< edge, IndInfo *, bool > *nodePtr)
 Template matching for a P-node with full, empty children and exactly one partial child. More...
 
virtual bool templateP6 (PQNode< edge, IndInfo *, bool > **nodePtr)
 Template matching for a P-node with full, empty and exactly two partial children. More...
 
virtual bool templateQ1 (PQNode< edge, IndInfo *, bool > *nodePtr, bool isRoot)
 Template matching for Q-nodes with only full children. More...
 
virtual bool templateQ2 (PQNode< edge, IndInfo *, bool > *nodePtr, bool isRoot)
 Template matching for Q-nodes with a pertinent sequence of children on one side of the Q-node. More...
 
virtual bool templateQ3 (PQNode< edge, IndInfo *, bool > *nodePtr)
 
- Protected Attributes inherited from ogdf::PQTree< edge, IndInfo *, bool >
int m_identificationNumber
 Stores the total number of nodes that have been allocated. More...
 
int m_numberOfLeaves
 Stores the number of leaves. More...
 
List< PQNode< edge, IndInfo *, bool > * > * m_pertinentNodes
 Stores all nodes that have been marked PQNodeRoot::PQNodeStatus::Full or PQNodeRoot::PQNodeStatus::Partial during a reduction. More...
 
PQNode< edge, IndInfo *, bool > * m_pertinentRoot
 a pointer to the root of the pertinent subtree. More...
 
PQNode< edge, IndInfo *, bool > * m_pseudoRoot
 a pointer to the virtual root of the pertinent subtree, in case that the pertinent root cannot be detected. More...
 
PQNode< edge, IndInfo *, bool > * m_root
 a pointer to the root of the $PQ$-tree. More...
 

Detailed Description

Definition at line 51 of file PlanarPQTree.h.

Constructor & Destructor Documentation

◆ PlanarPQTree()

ogdf::booth_lueker::PlanarPQTree::PlanarPQTree ( )
inline

Definition at line 53 of file PlanarPQTree.h.

◆ ~PlanarPQTree()

virtual ogdf::booth_lueker::PlanarPQTree::~PlanarPQTree ( )
inlinevirtual

Definition at line 55 of file PlanarPQTree.h.

Member Function Documentation

◆ emptyAllPertinentNodes()

virtual void ogdf::booth_lueker::PlanarPQTree::emptyAllPertinentNodes ( )
overridevirtual

Does a clean up after a reduction.

Reimplemented from ogdf::PQTree< edge, IndInfo *, bool >.

◆ Initialize() [1/2]

virtual int ogdf::booth_lueker::PlanarPQTree::Initialize ( SListPure< PlanarLeafKey< IndInfo * > * > &  leafKeys)
virtual

Initializes a new PQ-tree with a set of leaves.

◆ Initialize() [2/2]

int ogdf::booth_lueker::PlanarPQTree::Initialize ( SListPure< PQLeafKey< edge, IndInfo *, bool > * > &  leafKeys)
inlineoverride

Definition at line 63 of file PlanarPQTree.h.

◆ Reduction() [1/2]

virtual bool ogdf::booth_lueker::PlanarPQTree::Reduction ( SListPure< PlanarLeafKey< IndInfo * > * > &  leafKeys)
virtual

Reduces a set of leaves.

◆ Reduction() [2/2]

bool ogdf::booth_lueker::PlanarPQTree::Reduction ( SListPure< PQLeafKey< edge, IndInfo *, bool > * > &  leafKeys)
inlineoverride

Definition at line 73 of file PlanarPQTree.h.

◆ ReplaceFullRoot()

void ogdf::booth_lueker::PlanarPQTree::ReplaceFullRoot ( SListPure< PlanarLeafKey< IndInfo * > * > &  leafKeys)
private

Replaces a pertinet subtree by a set of new leaves if the root is full.

◆ ReplacePartialRoot()

void ogdf::booth_lueker::PlanarPQTree::ReplacePartialRoot ( SListPure< PlanarLeafKey< IndInfo * > * > &  leafKeys)
private

Replaces a pertinet subtree by a set of new leaves if the root is partial.

◆ ReplaceRoot()

void ogdf::booth_lueker::PlanarPQTree::ReplaceRoot ( SListPure< PlanarLeafKey< IndInfo * > * > &  leafKeys)

Replaces the pertinent subtree by a set of new leaves.


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