|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
K shortest paths: loopless Yen vs general Eppstein-style API. More...
#include <format>#include <iostream>#include <string>#include <K_Shortest_Paths.H>#include <tpl_array.H>#include <tpl_graph.H>Go to the source code of this file.
Functions | |
| int | main () |
| Runs a sample demonstration computing K shortest paths using two APIs and prints their results. | |
K shortest paths: loopless Yen vs general Eppstein-style API.
Build and run:
cmake -S . -B build cmake –build build –target k_shortest_paths_example ./build/Examples/k_shortest_paths_example
Definition in file k_shortest_paths_example.cc.
| int main | ( | ) |
Runs a sample demonstration computing K shortest paths using two APIs and prints their results.
Constructs a sample scenario, builds a directed graph, computes up to K shortest paths using Yen's loopless algorithm and an Eppstein-style API, and prints each algorithm's results to standard output.
Definition at line 162 of file k_shortest_paths_example.cc.
References Aleph::divide_and_conquer_partition_dp(), and nodes.