iceoryx_doc  1.0.1
Public Types | Public Member Functions | List of all members
DirectedAcyclicGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT > Class Template Reference

#include <directed_acyclic_graph.hpp>

Inheritance diagram for DirectedAcyclicGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >:
Inheritance graph
[legend]
Collaboration diagram for DirectedAcyclicGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >:
Collaboration graph
[legend]

Public Types

using Index_t = typename base_type::Index_t
 
- Public Types inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
using Index_t = int32_t
 
using AdjacencyList = iox::cxx::vector< VertexType *, DEGREE_LIMIT >
 

Public Member Functions

virtual bool addEdge (VertexType *fromVertex, VertexType *toVertex)
 
- Public Member Functions inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
bool addVertex (VertexType *vertex)
 
Index_t getIndex (VertexType const *vertex)
 
const AdjacencyListgetSuccessors (VertexType const *vertex)
 
const AdjacencyListgetPredecessors (VertexType const *vertex)
 
const AdjacencyListgetSuccessors (Index_t index)
 
const AdjacencyListgetPredecessors (Index_t index)
 
iox::cxx::vector< VertexType *, VERTEX_LIMIT > getSources ()
 
iox::cxx::vector< VertexType *, VERTEX_LIMIT > getSinks ()
 
bool isSource (VertexType const *vertex)
 
bool isSink (VertexType const *vertex)
 
size_t numberOfVertices ()
 
size_t numberOfEdges ()
 

Additional Inherited Members

- Static Public Attributes inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
static constexpr Index_t INVALID_INDEX = -1
 
- Protected Types inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
using AdjacencyIndexList = iox::cxx::vector< Index_t, DEGREE_LIMIT >
 
- Protected Member Functions inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
Index_t findVertex (VertexType const *vertex) const
 
bool isValid (Index_t index)
 
- Protected Attributes inherited from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >
iox::cxx::vector< VertexData, VERTEX_LIMIT > m_vertices
 
size_t m_numEdges {0}
 

Detailed Description

template<typename VertexType, int32_t VERTEX_LIMIT, int32_t DEGREE_LIMIT>
class DirectedAcyclicGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >

Todo:
: refine and move to utils same functionality as its parent class DirectedGraph, except that adding edges that close a cycle is impossible now (this incurs a checking overhead of course)

Member Function Documentation

◆ addEdge()

template<typename VertexType , int32_t VERTEX_LIMIT, int32_t DEGREE_LIMIT>
virtual bool DirectedAcyclicGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >::addEdge ( VertexType *  fromVertex,
VertexType *  toVertex 
)
inlinevirtual

add an edge between fromVertex and toVertex to the graph

Parameters
[in]fromVertex
[in]toVertex
Returns
pointer true if the edge was added successfully, false otherwise (e.g. it would create a cycle)

Reimplemented from DirectedGraph< VertexType, VERTEX_LIMIT, DEGREE_LIMIT >.


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