Template Class Graph

Class Documentation

template<typename BaseGraphT>
class Graph

Manages the actual routing graph and provieds different views on the edges (lazily computed)

Public Types

using FilteredGraph = FilteredGraphT<BaseGraphT>
using CostFilter = EdgeCostFilter<BaseGraphT>
using Vertex = typename boost::graph_traits<BaseGraphT>::vertex_descriptor
using Edge = typename boost::graph_traits<BaseGraphT>::edge_descriptor

Public Functions

inline explicit Graph(size_t numRoutingCosts)
inline const BaseGraphT &get() const noexcept
inline BaseGraphT &get() noexcept
inline size_t numRoutingCosts() const noexcept
inline const LaneletOrAreaToVertex &vertexLookup() const noexcept
inline FilteredGraph withLaneChanges(RoutingCostId routingCostId = 0) const
inline FilteredGraph withoutLaneChanges(RoutingCostId routingCostId = 0) const
inline FilteredGraph withAreasAndLaneChanges(RoutingCostId routingCostId = 0) const
inline FilteredGraph withAreasWithoutLaneChanges(RoutingCostId routingCostId = 0) const
inline FilteredGraph left(RoutingCostId routingCostId = 0) const
inline FilteredGraph somehowLeft(RoutingCostId routingCostId = 0) const
inline FilteredGraph right(RoutingCostId routingCostId = 0) const
inline FilteredGraph somehowRight(RoutingCostId routingCostId = 0) const
inline FilteredGraph adjacentLeft(RoutingCostId routingCostId = 0) const
inline FilteredGraph adjacentRight(RoutingCostId routingCostId = 0) const
inline FilteredGraph conflicting(RoutingCostId routingCostId = 0) const
inline FilteredGraph withoutConflicting(RoutingCostId routingCostId = 0) const
inline bool empty() const noexcept
inline Vertex addVertex(const typename BaseGraphT::vertex_property_type &property)

add new lanelet to graph

inline void addEdge(const ConstLaneletOrArea &from, const ConstLaneletOrArea &to, const EdgeInfo &edgeInfo)
inline void addEdge(Vertex from, Vertex to, const EdgeInfo &edgeInfo)
inline Optional<EdgeInfo> getEdgeInfo(const ConstLanelet &from, const ConstLanelet &to) const noexcept

Received the edgeInfo between two given vertices.

Returns:

EdgeInfo or nothing if there’s no edge

template<typename Graph>
inline Optional<EdgeInfo> getEdgeInfoFor(const ConstLanelet &from, const ConstLanelet &to, const Graph &g) const noexcept

Received the edgeInfo between two given vertices and a given (filtered)graph.

Returns:

EdgeInfo or nothing if there’s no edge

inline Optional<typename boost::graph_traits<BaseGraphT>::vertex_descriptor> getVertex(const ConstLaneletOrArea &lanelet) const noexcept

Helper function to determine the graph vertex of a given lanelet.