Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
k_shortest_paths_example.cc File Reference

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>
Include dependency graph for k_shortest_paths_example.cc:

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.
 

Detailed Description

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.

Function Documentation

◆ main()

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.

Returns
int Exit code (0 on success).

Definition at line 162 of file k_shortest_paths_example.cc.

References Aleph::divide_and_conquer_partition_dp(), and nodes.