/srv/osrm/osrm-backend/src/partitioner
NameSizeModeActions
bisection_graph_view.cpp17000644editdlrm
bisection_to_partition.cpp54970644editdlrm
dinic_max_flow.cpp121380644editdlrm
inertial_flow.cpp50540644editdlrm
partitioner.cpp90530644editdlrm
recursive_bisection.cpp39980644editdlrm
recursive_bisection_state.cpp71650644editdlrm
renumber.cpp25940644editdlrm
tarjan_graph_wrapper.cpp6390644editdlrm
Edit: /srv/osrm/osrm-backend/src/partitioner/bisection_graph_view.cpp (1700B)
#include "partitioner/bisection_graph_view.hpp" #include #include #include namespace osrm::partitioner { BisectionGraphView::BisectionGraphView(const BisectionGraph &bisection_graph_) : BisectionGraphView(bisection_graph_, bisection_graph_.CBegin(), bisection_graph_.CEnd()) { } BisectionGraphView::BisectionGraphView(const BisectionGraph &bisection_graph_, const BisectionGraph::ConstNodeIterator begin_, const BisectionGraph::ConstNodeIterator end_) : bisection_graph(bisection_graph_), begin(begin_), end(end_) { } BisectionGraphView::BisectionGraphView(const BisectionGraphView &other_view, const BisectionGraph::ConstNodeIterator begin_, const BisectionGraph::ConstNodeIterator end_) : BisectionGraphView(other_view.bisection_graph, begin_, end_) { } std::size_t BisectionGraphView::NumberOfNodes() const { return std::distance(begin, end); } NodeID BisectionGraphView::GetID(const NodeT &node) const { const auto node_id = static_cast(&node - &(*begin)); BOOST_ASSERT(node_id < NumberOfNodes()); return node_id; } BisectionGraph::ConstNodeIterator BisectionGraphView::Begin() const { return begin; } BisectionGraph::ConstNodeIterator BisectionGraphView::End() const { return end; } const BisectionGraphView::NodeT &BisectionGraphView::Node(const NodeID nid) const { return *(begin + nid); } const BisectionGraphView::EdgeT &BisectionGraphView::Edge(const EdgeID eid) const { return bisection_graph.Edge(eid); } } // namespace osrm::partitioner