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

Tests for K_Shortest_Paths.H (Yen / Eppstein-style API). More...

#include <gtest/gtest.h>
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <functional>
#include <limits>
#include <random>
#include <stdexcept>
#include <string>
#include <tuple>
#include <utility>
#include <K_Shortest_Paths.H>
#include <tpl_array.H>
#include <tpl_dynArray.H>
#include <tpl_graph.H>
#include <tpl_olhash.H>
Include dependency graph for k_shortest_paths_test.cc:

Go to the source code of this file.

Functions

 TEST (KShortestPathsTest, YenKnownGraphProducesExpectedCosts)
 
 TEST (KShortestPathsTest, EppsteinApiMatchesYenOnKnownGraph)
 
 TEST (KShortestPathsTest, EppsteinCanReturnCyclicAlternatives)
 
 TEST (KShortestPathsTest, SourceEqualsTargetReturnsTrivialPath)
 
 TEST (KShortestPathsTest, UnreachableReturnsEmpty)
 
 TEST (KShortestPathsTest, NegativeWeightsThrowDomainError)
 
 TEST (KShortestPathsTest, RandomSmallGraphsMatchExactOracle)
 
 TEST (KShortestPathsTest, ReturnedPathsAreSimpleAndNonDecreasingCost)
 
 TEST (KShortestPathsTest, EppsteinResultsAreNonDecreasingCost)
 
 TEST (KShortestPathsTest, SelfLoopAndParallelArcs)
 
 TEST (KShortestPathsTest, EppsteinLeavesOutTheWalksWhoseCostDoesNotFit)
 
 TEST (KShortestPathsTest, APathOfExactlyMaxIsGiven)
 
 TEST (KShortestPathsTest, YenGoesOnPastASpurNodeBeyondMax)
 
 TEST (KShortestPathsTest, EppsteinTakesAHeavyParallelArcOfTheTree)
 
 TEST (KShortestPathsTest, EppsteinLeavesOutOfItsIndexANodeBeyondMax)
 
 TEST (KShortestPathsTest, AnOverflowErrorOfTheDistanceOrOfTheFilterPassesOn)
 
 TEST (KShortestPathsTest, PerfRegression)
 

Detailed Description

Tests for K_Shortest_Paths.H (Yen / Eppstein-style API).

Definition in file k_shortest_paths_test.cc.

Function Documentation

◆ TEST() [1/17]

TEST ( KShortestPathsTest  ,
AnOverflowErrorOfTheDistanceOrOfTheFilterPassesOn   
)

◆ TEST() [2/17]

TEST ( KShortestPathsTest  ,
APathOfExactlyMaxIsGiven   
)

Definition at line 617 of file k_shortest_paths_test.cc.

◆ TEST() [3/17]

TEST ( KShortestPathsTest  ,
EppsteinApiMatchesYenOnKnownGraph   
)

Definition at line 328 of file k_shortest_paths_test.cc.

◆ TEST() [4/17]

TEST ( KShortestPathsTest  ,
EppsteinCanReturnCyclicAlternatives   
)

Definition at line 350 of file k_shortest_paths_test.cc.

References nodes.

◆ TEST() [5/17]

TEST ( KShortestPathsTest  ,
EppsteinLeavesOutOfItsIndexANodeBeyondMax   
)

Definition at line 716 of file k_shortest_paths_test.cc.

References y.

◆ TEST() [6/17]

TEST ( KShortestPathsTest  ,
EppsteinLeavesOutTheWalksWhoseCostDoesNotFit   
)

Definition at line 577 of file k_shortest_paths_test.cc.

References h, and Aleph::size().

◆ TEST() [7/17]

TEST ( KShortestPathsTest  ,
EppsteinResultsAreNonDecreasingCost   
)

Definition at line 491 of file k_shortest_paths_test.cc.

◆ TEST() [8/17]

TEST ( KShortestPathsTest  ,
EppsteinTakesAHeavyParallelArcOfTheTree   
)

Definition at line 682 of file k_shortest_paths_test.cc.

◆ TEST() [9/17]

TEST ( KShortestPathsTest  ,
NegativeWeightsThrowDomainError   
)

Definition at line 407 of file k_shortest_paths_test.cc.

◆ TEST() [10/17]

TEST ( KShortestPathsTest  ,
PerfRegression   
)

Definition at line 875 of file k_shortest_paths_test.cc.

References rng.

◆ TEST() [11/17]

TEST ( KShortestPathsTest  ,
RandomSmallGraphsMatchExactOracle   
)

Definition at line 423 of file k_shortest_paths_test.cc.

References nodes, and rng.

◆ TEST() [12/17]

TEST ( KShortestPathsTest  ,
ReturnedPathsAreSimpleAndNonDecreasingCost   
)

Definition at line 469 of file k_shortest_paths_test.cc.

◆ TEST() [13/17]

TEST ( KShortestPathsTest  ,
SelfLoopAndParallelArcs   
)

Definition at line 512 of file k_shortest_paths_test.cc.

References nodes.

◆ TEST() [14/17]

TEST ( KShortestPathsTest  ,
SourceEqualsTargetReturnsTrivialPath   
)

Definition at line 375 of file k_shortest_paths_test.cc.

References nodes.

◆ TEST() [15/17]

TEST ( KShortestPathsTest  ,
UnreachableReturnsEmpty   
)

Definition at line 394 of file k_shortest_paths_test.cc.

◆ TEST() [16/17]

TEST ( KShortestPathsTest  ,
YenGoesOnPastASpurNodeBeyondMax   
)

Definition at line 654 of file k_shortest_paths_test.cc.

◆ TEST() [17/17]

TEST ( KShortestPathsTest  ,
YenKnownGraphProducesExpectedCosts   
)

Definition at line 307 of file k_shortest_paths_test.cc.