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

Function ManipulateTableForNonRoundtripFS

src/engine/plugins/trip.cpp:116–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void ManipulateTableForNonRoundtripFS(const std::size_t source_id,
117 util::DistTableWrapper<EdgeDuration> &result_table)
118{
119 // We can use the round-trip calculation to simulate non-round-trip fixed start
120 // by making all paths to the source location zero. Effectively finding an 'optimal'
121 // round-trip path that ignores the cost of getting back from any destination to the
122 // source.
123 for (const auto i : util::irange<size_t>(0, result_table.GetNumberOfNodes()))
124 {
125 result_table.SetValue(i, source_id, {0});
126 }
127}
128
129void ManipulateTableForNonRoundtripFE(const std::size_t destination_id,
130 util::DistTableWrapper<EdgeDuration> &result_table)

Callers 1

HandleRequestMethod · 0.85

Calls 2

SetValueMethod · 0.80
GetNumberOfNodesMethod · 0.45

Tested by

no test coverage detected