OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Graph Class Reference

#include "Graph.h"

Public Member Functions

std::shared_ptr< GraphNodeaddNode ()
 
std::shared_ptr< GraphNodegetNode (int nodeID)
 
const std::list< std::shared_ptr< GraphNode > > getContainedNodes () const
 
const bool hasCycles (const std::shared_ptr< GraphNode > startNode) const
 

Protected Member Functions

bool TraverseNodesUntilCycle (const std::shared_ptr< GraphNode > node, std::vector< bool > &visited, std::vector< bool > &recursiveStack) const
 

Protected Attributes

int _counter = 0
 
std::list< std::shared_ptr< GraphNode > > _nodes
 

Member Function Documentation

◆ addNode()

std::shared_ptr< GraphNode > Graph::addNode ( )

◆ getContainedNodes()

const std::list< std::shared_ptr< GraphNode > > Graph::getContainedNodes ( ) const
inline

◆ getNode()

std::shared_ptr< GraphNode > Graph::getNode ( int nodeID)

◆ hasCycles()

const bool Graph::hasCycles ( const std::shared_ptr< GraphNode > startNode) const

◆ TraverseNodesUntilCycle()

bool Graph::TraverseNodesUntilCycle ( const std::shared_ptr< GraphNode > node,
std::vector< bool > & visited,
std::vector< bool > & recursiveStack ) const
protected

Member Data Documentation

◆ _counter

int Graph::_counter = 0
protected

◆ _nodes

std::list<std::shared_ptr<GraphNode> > Graph::_nodes
protected

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