MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / ManipulateTableForNonRoundtripFE

Function ManipulateTableForNonRoundtripFE

src/engine/plugins/trip.cpp:129–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void ManipulateTableForNonRoundtripFE(const std::size_t destination_id,
130 util::DistTableWrapper<EdgeDuration> &result_table)
131{
132 // We can use the round-trip calculation to simulate non-round-trip fixed end
133 // by making all paths from the destination to other locations zero.
134 // Effectively, finding an 'optimal' round-trip path that ignores the cost of getting
135 // from the destination to any source.
136 for (const auto i : util::irange<size_t>(0, result_table.GetNumberOfNodes()))
137 {
138 result_table.SetValue(destination_id, i, {0});
139 }
140}
141
142Status TripPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
143 const api::TripParameters &parameters,

Callers 1

HandleRequestMethod · 0.85

Calls 2

SetValueMethod · 0.80
GetNumberOfNodesMethod · 0.45

Tested by

no test coverage detected