OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
oms::DirectedGraph Class Reference

#include <DirectedGraph.h>

Classes

struct  suppressUnitConversion
 

Public Member Functions

 DirectedGraph ()
 
 ~DirectedGraph ()
 
void clear ()
 
int addNode (const Connector &var)
 
void addEdge (const Connector &var1, const Connector &var2)
 
void dotExport (const std::string &filename)
 
void includeGraph (const DirectedGraph &graph, const ComRef &prefix)
 
const std::vector< scc_t > & getSortedConnections ()
 
const std::vector< Connector > & getNodes () const
 
const scc_tgetEdges () const
 
void setUnits (Connector *conA, Connector *conB, bool suppressUnitConversion)
 
void dumpNodes () const
 

Private Member Functions

std::deque< std::vector< int > > getSCCs ()
 
void calculateSortedConnections ()
 
void strongconnect (int v, std::vector< std::vector< int > > G, int &index, int *d, int *low, std::stack< int > &S, bool *stacked, std::deque< std::vector< int > > &components)
 

Static Private Member Functions

static int getEdgeIndex (const scc_t &edges, int from, int to)
 

Private Attributes

std::vector< Connectornodes
 
scc_t edges
 
std::vector< std::vector< int > > G
 
std::vector< scc_tsortedConnections
 
bool sortedConnectionsAreValid
 
std::vector< suppressUnitConversionunitConversion
 

Constructor & Destructor Documentation

◆ DirectedGraph()

oms::DirectedGraph::DirectedGraph ( )

◆ ~DirectedGraph()

oms::DirectedGraph::~DirectedGraph ( )

Member Function Documentation

◆ addEdge()

void oms::DirectedGraph::addEdge ( const Connector var1,
const Connector var2 
)

◆ addNode()

int oms::DirectedGraph::addNode ( const Connector var)

◆ calculateSortedConnections()

void oms::DirectedGraph::calculateSortedConnections ( )
private

◆ clear()

void oms::DirectedGraph::clear ( )

◆ dotExport()

void oms::DirectedGraph::dotExport ( const std::string &  filename)

◆ dumpNodes()

void oms::DirectedGraph::dumpNodes ( ) const

◆ getEdgeIndex()

int oms::DirectedGraph::getEdgeIndex ( const scc_t edges,
int  from,
int  to 
)
staticprivate

◆ getEdges()

const scc_t& oms::DirectedGraph::getEdges ( ) const
inline

◆ getNodes()

const std::vector<Connector>& oms::DirectedGraph::getNodes ( ) const
inline

◆ getSCCs()

std::deque< std::vector< int > > oms::DirectedGraph::getSCCs ( )
private

◆ getSortedConnections()

const std::vector< oms::scc_t > & oms::DirectedGraph::getSortedConnections ( )

◆ includeGraph()

void oms::DirectedGraph::includeGraph ( const DirectedGraph graph,
const ComRef prefix 
)

◆ setUnits()

void oms::DirectedGraph::setUnits ( Connector conA,
Connector conB,
bool  suppressUnitConversion 
)

◆ strongconnect()

void oms::DirectedGraph::strongconnect ( int  v,
std::vector< std::vector< int > >  G,
int &  index,
int *  d,
int *  low,
std::stack< int > &  S,
bool *  stacked,
std::deque< std::vector< int > > &  components 
)
private

Member Data Documentation

◆ edges

scc_t oms::DirectedGraph::edges
private

◆ G

std::vector< std::vector<int> > oms::DirectedGraph::G
private

◆ nodes

std::vector<Connector> oms::DirectedGraph::nodes
private

◆ sortedConnections

std::vector< scc_t > oms::DirectedGraph::sortedConnections
private

◆ sortedConnectionsAreValid

bool oms::DirectedGraph::sortedConnectionsAreValid
private

◆ unitConversion

std::vector<suppressUnitConversion> oms::DirectedGraph::unitConversion
private

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