MCPcopy Create free account
hub / github.com/comaps/comaps / GetTransitEdges

Method GetTransitEdges

libs/routing/transit_graph.cpp:178–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void TransitGraph::GetTransitEdges(Segment const & segment, bool isOutgoing, EdgeListT & edges) const
179{
180 CHECK(IsTransitSegment(segment), ("Nontransit segment passed to TransitGraph."));
181 for (auto const & s : m_fake.GetEdges(segment, isOutgoing))
182 {
183 auto const & from = isOutgoing ? segment : s;
184 auto const & to = isOutgoing ? s : segment;
185 edges.emplace_back(s, CalcSegmentWeight(to, EdgeEstimator::Purpose::Weight) + GetTransferPenalty(from, to));
186 }
187}
188
189set<Segment> const & TransitGraph::GetFake(Segment const & real) const
190{

Callers 1

GetEdgeListMethod · 0.80

Calls 2

GetEdgesMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected