PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::DirectedAcyclicGraph Class Reference

Graph class represents a directed graph. More...

#include <DirectedAcyclicGraph.h>

Public Member Functions

 DirectedAcyclicGraph ()
 
 ~DirectedAcyclicGraph ()
 
void addEdge (ObjectId v, ObjectId w)
 
std::vector< ObjectId > & topologicalSort (ObjectId v)
 
std::vector< ObjectId > & topologicalSort ()
 
size_t sizeOfVertex () const
 
size_t OtherVerticesSize ()
 
std::set< ObjectId > & getOtherVertices ()
 
std::set< ObjectId > & vertices ()
 
std::map< ObjectId, std::unordered_set< ObjectId > > & edges ()
 
std::map< ObjectId, std::unordered_set< ObjectId > > & reverseEdges ()
 
void addOtherVertices (ObjectId v)
 
void addtoRemoveList (ObjectId v)
 
void removeID (ObjectId v=-1, ObjectId w=-1)
 

Private Member Functions

void topologicalSortUtil (ObjectId v, std::map< ObjectId, bool > &visited, std::stack< ObjectId > &stack)
 
void topologicalSortUtil (ObjectId v, std::map< ObjectId, bool > &visited)
 

Private Attributes

std::vector< ObjectIdmOrderVertices
 
std::set< ObjectIdmVertices
 
std::map< ObjectId, std::unordered_set< ObjectId > > mEdges
 
std::map< ObjectId, std::unordered_set< ObjectId > > mReverseEdges
 
std::set< ObjectIdOtherVertices
 
std::set< ObjectIdRemoveList
 

Detailed Description

Graph class represents a directed graph.

Definition at line 32 of file DirectedAcyclicGraph.h.

Constructor & Destructor Documentation

◆ DirectedAcyclicGraph()

dyno::DirectedAcyclicGraph::DirectedAcyclicGraph ( )
inline

Definition at line 35 of file DirectedAcyclicGraph.h.

◆ ~DirectedAcyclicGraph()

dyno::DirectedAcyclicGraph::~DirectedAcyclicGraph ( )

Definition at line 6 of file DirectedAcyclicGraph.cpp.

Member Function Documentation

◆ addEdge()

void dyno::DirectedAcyclicGraph::addEdge ( ObjectId v,
ObjectId w )

Definition at line 24 of file DirectedAcyclicGraph.cpp.

Here is the caller graph for this function:

◆ addOtherVertices()

void dyno::DirectedAcyclicGraph::addOtherVertices ( ObjectId v)

Definition at line 140 of file DirectedAcyclicGraph.cpp.

Here is the caller graph for this function:

◆ addtoRemoveList()

void dyno::DirectedAcyclicGraph::addtoRemoveList ( ObjectId v)

Definition at line 146 of file DirectedAcyclicGraph.cpp.

Here is the caller graph for this function:

◆ edges()

std::map< dyno::ObjectId, std::unordered_set< dyno::ObjectId > > & dyno::DirectedAcyclicGraph::edges ( )

Definition at line 94 of file DirectedAcyclicGraph.cpp.

◆ getOtherVertices()

std::set< ObjectId > & dyno::DirectedAcyclicGraph::getOtherVertices ( )
inline

Definition at line 51 of file DirectedAcyclicGraph.h.

◆ OtherVerticesSize()

size_t dyno::DirectedAcyclicGraph::OtherVerticesSize ( )
inline

Definition at line 49 of file DirectedAcyclicGraph.h.

◆ removeID()

void dyno::DirectedAcyclicGraph::removeID ( ObjectId v = -1,
ObjectId w = -1 )

Definition at line 151 of file DirectedAcyclicGraph.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseEdges()

std::map< dyno::ObjectId, std::unordered_set< dyno::ObjectId > > & dyno::DirectedAcyclicGraph::reverseEdges ( )

Definition at line 99 of file DirectedAcyclicGraph.cpp.

◆ sizeOfVertex()

size_t dyno::DirectedAcyclicGraph::sizeOfVertex ( ) const

Definition at line 84 of file DirectedAcyclicGraph.cpp.

Here is the caller graph for this function:

◆ topologicalSort() [1/2]

std::vector< ObjectId > & dyno::DirectedAcyclicGraph::topologicalSort ( )

Definition at line 55 of file DirectedAcyclicGraph.cpp.

Here is the call graph for this function:

◆ topologicalSort() [2/2]

std::vector< ObjectId > & dyno::DirectedAcyclicGraph::topologicalSort ( ObjectId v)

Definition at line 36 of file DirectedAcyclicGraph.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ topologicalSortUtil() [1/2]

void dyno::DirectedAcyclicGraph::topologicalSortUtil ( ObjectId v,
std::map< ObjectId, bool > & visited )
private

Definition at line 127 of file DirectedAcyclicGraph.cpp.

Here is the call graph for this function:

◆ topologicalSortUtil() [2/2]

void dyno::DirectedAcyclicGraph::topologicalSortUtil ( ObjectId v,
std::map< ObjectId, bool > & visited,
std::stack< ObjectId > & stack )
private

Definition at line 104 of file DirectedAcyclicGraph.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vertices()

std::set< dyno::ObjectId > & dyno::DirectedAcyclicGraph::vertices ( )

Definition at line 89 of file DirectedAcyclicGraph.cpp.

Member Data Documentation

◆ mEdges

std::map<ObjectId, std::unordered_set<ObjectId> > dyno::DirectedAcyclicGraph::mEdges
private

Definition at line 73 of file DirectedAcyclicGraph.h.

◆ mOrderVertices

std::vector<ObjectId> dyno::DirectedAcyclicGraph::mOrderVertices
private

Definition at line 71 of file DirectedAcyclicGraph.h.

◆ mReverseEdges

std::map<ObjectId, std::unordered_set<ObjectId> > dyno::DirectedAcyclicGraph::mReverseEdges
private

Definition at line 74 of file DirectedAcyclicGraph.h.

◆ mVertices

std::set<ObjectId> dyno::DirectedAcyclicGraph::mVertices
private

Definition at line 72 of file DirectedAcyclicGraph.h.

◆ OtherVertices

std::set<ObjectId> dyno::DirectedAcyclicGraph::OtherVertices
private

Definition at line 75 of file DirectedAcyclicGraph.h.

◆ RemoveList

std::set<ObjectId> dyno::DirectedAcyclicGraph::RemoveList
private

Definition at line 76 of file DirectedAcyclicGraph.h.


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