clang-format off * The trip plugin solves the Traveling Salesman Problem using a greedy heuristic * (farthest-insertion algorithm) for 10 or * more waypoints and uses brute force for less than 10 * waypoints. The returned path does not have to be the shortest path, * as TSP is NP-hard it is * only an approximation. * * Note that all input coordinates have to be connected for the trip service
| 589 | */ |
| 590 | // clang-format on |
| 591 | Napi::Value Engine::trip(const Napi::CallbackInfo &info) |
| 592 | { |
| 593 | osrm::Status (osrm::OSRM::*trip_fn)(const osrm::TripParameters ¶ms, |
| 594 | osrm::engine::api::ResultT &result) const = |
| 595 | &osrm::OSRM::Trip; |
| 596 | async(info, &argumentsToTripParameter, trip_fn, true); |
| 597 | return info.Env().Undefined(); |
| 598 | } |
| 599 | |
| 600 | /** |
| 601 | * All plugins support a second additional object that is available to configure some NodeJS |
no test coverage detected