osrm-backend/src/partition/tarjan_graph_wrapper.cpp
Moritz Kobitzsch c3cc79f798 always emit a small component view
Unit Tests for Reodering by Predicate
2017-03-01 16:09:29 +00:00

27 lines
658 B
C++

#include "partition/tarjan_graph_wrapper.hpp"
namespace osrm
{
namespace partition
{
TarjanGraphWrapper::TarjanGraphWrapper(const BisectionGraph &bisection_graph_)
: bisection_graph(bisection_graph_)
{
}
std::size_t TarjanGraphWrapper::GetNumberOfNodes() const { return bisection_graph.NumberOfNodes(); }
util::range<EdgeID> TarjanGraphWrapper::GetAdjacentEdgeRange(const NodeID nid) const
{
return util::irange<EdgeID>(bisection_graph.BeginEdgeID(nid), bisection_graph.EndEdgeID(nid));
}
NodeID TarjanGraphWrapper::GetTarget(const EdgeID eid) const
{
return bisection_graph.Edge(eid).target;
}
} // namespace partition
} // namespace osrm