Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::sync_plan::PMatching Class Reference

Manages the matching of P-nodes via pipes in an instance of SyncPlan. More...

#include <ogdf/cluster/sync_plan/PMatching.h>

+ Inheritance diagram for ogdf::sync_plan::PMatching:

Public Member Functions

 PMatching (const Graph *G)
 
List< Pipe >::const_iterator begin () const
 
List< Pipe >::const_iterator end () const
 
PipeBijRange getIncidentEdgeBijection (node u) const
 Get the bijection between the edges incident to the two endpoints of a pipe. More...
 
void getIncidentEdgeBijection (node u, AdjEntryArray< adjEntry > &out) const
 
void getIncidentEdgeBijection (node u, EdgeArray< edge > &out) const
 
void getIncidentEdgeBijection (node u, PipeBij &out) const
 
const PipegetPipe (node n) const
 
int getPipeCount () const
 
PipeQueuegetPipeQueue () const
 
const List< Pipe > & getPipes () const
 
int getPriorityPipeCount () const
 
const PipegetTopPipe () const
 
node getTwin (node n) const
 For a matched vertex, return the vertex it is matched with. More...
 
node getTwinOrNull (node n) const
 
bool isMatchedPVertex (node n) const
 
bool isReduced () const
 Whether there are no pipes left. More...
 
void makePriority (node n)
 Mark the pipe of this ndoe to be processed before all other pipes, no matter the order in the PipeQueue. More...
 
void matchNodes (node f, node s)
 
std::function< std::ostream &(std::ostream &)> printBijection (node u) const
 
void rebuildHeap ()
 Rebuild the PipeQueue, e.g. after priorities were changed externally. More...
 
node removeMatching (node n, node t=nullptr)
 
void setPipeQueue (PipeQueue *q)
 
void setPipeQueue (std::unique_ptr< PipeQueue > q)
 
adjEntry translateIncidentEdge (adjEntry e) const
 

Protected Member Functions

void cleared () override
 Called by watched graph when its clear function is called, just before things are removed. More...
 
void edgeAdded (edge e) override
 Called by watched graph after an edge has been added. More...
 
void edgeDeleted (edge e) override
 Called by watched graph just before an edge is deleted. More...
 
void nodeAdded (node v) override
 Called by watched graph after a node has been added. More...
 
void nodeDeleted (node v) override
 Called by watched graph just before a node is deleted. More...
 
- Protected Member Functions inherited from ogdf::GraphObserver
 GraphObserver ()=default
 Constructs instance of GraphObserver class. More...
 
 GraphObserver (const Graph *G)
 Constructs instance of GraphObserver class. More...
 
const GraphgetGraph () const
 
- Protected Member Functions inherited from ogdf::Observer< Graph, GraphObserver >
 Observer ()=default
 Constructs instance of Observer class. More...
 
 Observer (const Observer &copy)=delete
 If you want to copy a subclass of Observer, call the default Observer() constructor and optionally also call reregister if it makes sense. More...
 
 Observer (Observer &&move)=delete
 If you want to move a subclass of Observer, call the default Observer() constructor and optionally also call reregister if it makes sense. More...
 
virtual ~Observer ()
 Destroys the instance, unregisters it from watched instance. More...
 
const GraphgetObserved () const
 
Observeroperator= (const Observer &copy)=delete
 
Observeroperator= (Observer &&move)=delete
 
virtual void registrationChanged (const Graph *old)
 Called after reregister() changed the observed instance. More...
 
void reregister (const Graph *obs)
 Associates observer instance with instance obs. More...
 

Private Attributes

NodeArray< Pipe * > nodes
 
List< Pipepipes_list
 
int priority_pipes = 0
 
std::unique_ptr< PipeQueuequeue
 

Friends

class SyncPlanConsistency
 

Detailed Description

Manages the matching of P-nodes via pipes in an instance of SyncPlan.

Definition at line 86 of file PMatching.h.

Constructor & Destructor Documentation

◆ PMatching()

ogdf::sync_plan::PMatching::PMatching ( const Graph G)
inlineexplicit

Definition at line 96 of file PMatching.h.

Member Function Documentation

◆ begin()

List<Pipe>::const_iterator ogdf::sync_plan::PMatching::begin ( ) const

◆ cleared()

void ogdf::sync_plan::PMatching::cleared ( )
inlineoverrideprotectedvirtual

Called by watched graph when its clear function is called, just before things are removed.

Implements ogdf::GraphObserver.

Definition at line 166 of file PMatching.h.

◆ edgeAdded()

void ogdf::sync_plan::PMatching::edgeAdded ( edge  e)
inlineoverrideprotectedvirtual

Called by watched graph after an edge has been added.

Implements ogdf::GraphObserver.

Definition at line 164 of file PMatching.h.

◆ edgeDeleted()

void ogdf::sync_plan::PMatching::edgeDeleted ( edge  e)
inlineoverrideprotectedvirtual

Called by watched graph just before an edge is deleted.

Implements ogdf::GraphObserver.

Definition at line 162 of file PMatching.h.

◆ end()

List<Pipe>::const_iterator ogdf::sync_plan::PMatching::end ( ) const

◆ getIncidentEdgeBijection() [1/4]

PipeBijRange ogdf::sync_plan::PMatching::getIncidentEdgeBijection ( node  u) const

Get the bijection between the edges incident to the two endpoints of a pipe.

◆ getIncidentEdgeBijection() [2/4]

void ogdf::sync_plan::PMatching::getIncidentEdgeBijection ( node  u,
AdjEntryArray< adjEntry > &  out 
) const

◆ getIncidentEdgeBijection() [3/4]

void ogdf::sync_plan::PMatching::getIncidentEdgeBijection ( node  u,
EdgeArray< edge > &  out 
) const

◆ getIncidentEdgeBijection() [4/4]

void ogdf::sync_plan::PMatching::getIncidentEdgeBijection ( node  u,
PipeBij out 
) const

◆ getPipe()

const Pipe* ogdf::sync_plan::PMatching::getPipe ( node  n) const

◆ getPipeCount()

int ogdf::sync_plan::PMatching::getPipeCount ( ) const

◆ getPipeQueue()

PipeQueue* ogdf::sync_plan::PMatching::getPipeQueue ( ) const
inline

Definition at line 155 of file PMatching.h.

◆ getPipes()

const List<Pipe>& ogdf::sync_plan::PMatching::getPipes ( ) const

◆ getPriorityPipeCount()

int ogdf::sync_plan::PMatching::getPriorityPipeCount ( ) const
inline

Definition at line 140 of file PMatching.h.

◆ getTopPipe()

const Pipe& ogdf::sync_plan::PMatching::getTopPipe ( ) const

◆ getTwin()

node ogdf::sync_plan::PMatching::getTwin ( node  n) const

For a matched vertex, return the vertex it is matched with.

◆ getTwinOrNull()

node ogdf::sync_plan::PMatching::getTwinOrNull ( node  n) const

◆ isMatchedPVertex()

bool ogdf::sync_plan::PMatching::isMatchedPVertex ( node  n) const

◆ isReduced()

bool ogdf::sync_plan::PMatching::isReduced ( ) const

Whether there are no pipes left.

◆ makePriority()

void ogdf::sync_plan::PMatching::makePriority ( node  n)

Mark the pipe of this ndoe to be processed before all other pipes, no matter the order in the PipeQueue.

◆ matchNodes()

void ogdf::sync_plan::PMatching::matchNodes ( node  f,
node  s 
)

◆ nodeAdded()

void ogdf::sync_plan::PMatching::nodeAdded ( node  v)
inlineoverrideprotectedvirtual

Called by watched graph after a node has been added.

Implements ogdf::GraphObserver.

Definition at line 160 of file PMatching.h.

◆ nodeDeleted()

void ogdf::sync_plan::PMatching::nodeDeleted ( node  v)
overrideprotectedvirtual

Called by watched graph just before a node is deleted.

Implements ogdf::GraphObserver.

◆ printBijection()

std::function<std::ostream&(std::ostream&)> ogdf::sync_plan::PMatching::printBijection ( node  u) const

◆ rebuildHeap()

void ogdf::sync_plan::PMatching::rebuildHeap ( )

Rebuild the PipeQueue, e.g. after priorities were changed externally.

◆ removeMatching()

node ogdf::sync_plan::PMatching::removeMatching ( node  n,
node  t = nullptr 
)

◆ setPipeQueue() [1/2]

void ogdf::sync_plan::PMatching::setPipeQueue ( PipeQueue q)
inline

Definition at line 145 of file PMatching.h.

◆ setPipeQueue() [2/2]

void ogdf::sync_plan::PMatching::setPipeQueue ( std::unique_ptr< PipeQueue q)
inline

Definition at line 150 of file PMatching.h.

◆ translateIncidentEdge()

adjEntry ogdf::sync_plan::PMatching::translateIncidentEdge ( adjEntry  e) const

Friends And Related Function Documentation

◆ SyncPlanConsistency

friend class SyncPlanConsistency
friend

Definition at line 87 of file PMatching.h.

Member Data Documentation

◆ nodes

NodeArray<Pipe*> ogdf::sync_plan::PMatching::nodes
private

Definition at line 92 of file PMatching.h.

◆ pipes_list

List<Pipe> ogdf::sync_plan::PMatching::pipes_list
private

Definition at line 91 of file PMatching.h.

◆ priority_pipes

int ogdf::sync_plan::PMatching::priority_pipes = 0
private

Definition at line 90 of file PMatching.h.

◆ queue

std::unique_ptr<PipeQueue> ogdf::sync_plan::PMatching::queue
private

Definition at line 93 of file PMatching.h.


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