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

Tests for Floyd. More...

#include <gtest/gtest.h>
#include <functional>
#include <limits>
#include <map>
#include <random>
#include <stdexcept>
#include <thread>
#include <type_traits>
#include <utility>
#include <vector>
#include <tpl_graph_utils.H>
#include <Floyd_Warshall.H>
Include dependency graph for floyd.cc:

Go to the source code of this file.

Typedefs

using Grafo = List_Digraph< Graph_Node< int >, Graph_Arc< int > >
 
using GNode = Grafo::Node
 
using GArc = Grafo::Arc
 

Functions

 TEST (FloydBasicGraph, computes_correct_distances)
 
 TEST (FloydBasicGraph, handles_unreachable_nodes)
 
 TEST (FloydNegativeWeights, handles_negative_weights_without_cycles)
 
 TEST (FloydNegativeCycle, detects_negative_cycles)
 
 TEST (FloydIndexNode, finds_correct_indices)
 
 TEST (FloydIndexNode, throws_on_null_pointer)
 
 TEST (FloydPathReconstruction, throws_on_invalid_indices)
 
 TEST (FloydPathReconstruction, returns_valid_path)
 
 TEST (FloydPathReconstruction, handles_self_paths)
 
 TEST (FloydUtility, entry_formats_distances_correctly)
 
 TEST (FloydMatrices, path_matrix_has_correct_structure)
 
 TEST (FloydLargeGraph, handles_complete_graph)
 
 TEST (FloydStress, handles_single_node_graph)
 
 TEST (FloydAccessors, node_accessors_behavior)
 
 TEST (FloydParallelArcs, TakesTheLightest)
 
 TEST (FloydUndirected, PathsGoBothWaysAlongTheArcs)
 
 TEST (FloydUndirected, ANegativeArcIsANegativeCycle)
 
 TEST (FloydNumeric, ADistanceBelowTheRangeThrows)
 
 TEST (FloydNumeric, ADistanceAtTheBottomOfTheRangeCounts)
 
 TEST (FloydLoops, ANegativeLoopIsANegativeCycle)
 
 TEST (FloydLoops, APositiveLoopDoesNotCount)
 
 TEST (FloydNegativeCycle, GetMinPathThrows)
 
 TEST (FloydFilter, PathsUseOnlyTheArcsOfTheFilter)
 
 TEST (FloydRandom, MatchesRelaxationWithParallelArcsAndLoops)
 
 TEST (FloydDistance, UsesTheDistanceItWasGiven)
 
 TEST (FloydDistance, TakesADistanceWithoutADefaultConstructor)
 
 TEST (FloydDistance, TakesACallOperatorThatIsNotConst)
 
 TEST (FloydDistance, ConcurrentPathsDoNotShareTheDistance)
 
 TEST (FloydDistance, GetMinPathCopiesOnlyADistanceThatItMayChange)
 
 TEST (FloydDistance, EmptyBracesAreTheFilter)
 
 TEST (FloydDistance, TheClassIsDeducedFromTheDistance)
 
 TEST (FloydNegativeCycle, ACompleteDigraphOfNegativeArcs)
 
 TEST (FloydNegativeCycle, OneNegativeArcInALargeGraph)
 
 TEST (FloydLoops, ALoopAtTheBottomOfTheRangeIsANegativeCycle)
 

Detailed Description

Tests for Floyd.

Definition in file floyd.cc.

Typedef Documentation

◆ GArc

using GArc = Grafo::Arc

Definition at line 59 of file floyd.cc.

◆ GNode

using GNode = Grafo::Node

Definition at line 58 of file floyd.cc.

◆ Grafo

using Grafo = List_Digraph<Graph_Node<int>, Graph_Arc<int> >

Definition at line 57 of file floyd.cc.

Function Documentation

◆ TEST() [1/34]

◆ TEST() [2/34]

◆ TEST() [3/34]

◆ TEST() [4/34]

TEST ( FloydDistance  ,
ConcurrentPathsDoNotShareTheDistance   
)

◆ TEST() [5/34]

TEST ( FloydDistance  ,
EmptyBracesAreTheFilter   
)

Definition at line 916 of file floyd.cc.

◆ TEST() [6/34]

TEST ( FloydDistance  ,
GetMinPathCopiesOnlyADistanceThatItMayChange   
)

◆ TEST() [7/34]

TEST ( FloydDistance  ,
TakesACallOperatorThatIsNotConst   
)

◆ TEST() [8/34]

TEST ( FloydDistance  ,
TakesADistanceWithoutADefaultConstructor   
)

◆ TEST() [9/34]

TEST ( FloydDistance  ,
TheClassIsDeducedFromTheDistance   
)

Definition at line 932 of file floyd.cc.

◆ TEST() [10/34]

TEST ( FloydDistance  ,
UsesTheDistanceItWasGiven   
)

◆ TEST() [11/34]

◆ TEST() [12/34]

◆ TEST() [13/34]

TEST ( FloydIndexNode  ,
throws_on_null_pointer   
)

◆ TEST() [14/34]

◆ TEST() [15/34]

TEST ( FloydLoops  ,
ALoopAtTheBottomOfTheRangeIsANegativeCycle   
)

◆ TEST() [16/34]

TEST ( FloydLoops  ,
ANegativeLoopIsANegativeCycle   
)

◆ TEST() [17/34]

TEST ( FloydLoops  ,
APositiveLoopDoesNotCount   
)

◆ TEST() [18/34]

TEST ( FloydMatrices  ,
path_matrix_has_correct_structure   
)

◆ TEST() [19/34]

TEST ( FloydNegativeCycle  ,
ACompleteDigraphOfNegativeArcs   
)

◆ TEST() [20/34]

TEST ( FloydNegativeCycle  ,
detects_negative_cycles   
)

◆ TEST() [21/34]

TEST ( FloydNegativeCycle  ,
GetMinPathThrows   
)

◆ TEST() [22/34]

TEST ( FloydNegativeCycle  ,
OneNegativeArcInALargeGraph   
)

Definition at line 1035 of file floyd.cc.

References h.

◆ TEST() [23/34]

◆ TEST() [24/34]

TEST ( FloydNumeric  ,
ADistanceAtTheBottomOfTheRangeCounts   
)

◆ TEST() [25/34]

TEST ( FloydNumeric  ,
ADistanceBelowTheRangeThrows   
)

Definition at line 595 of file floyd.cc.

References h, and y.

◆ TEST() [26/34]

TEST ( FloydParallelArcs  ,
TakesTheLightest   
)

◆ TEST() [27/34]

TEST ( FloydPathReconstruction  ,
handles_self_paths   
)

◆ TEST() [28/34]

TEST ( FloydPathReconstruction  ,
returns_valid_path   
)

◆ TEST() [29/34]

TEST ( FloydPathReconstruction  ,
throws_on_invalid_indices   
)

◆ TEST() [30/34]

TEST ( FloydRandom  ,
MatchesRelaxationWithParallelArcsAndLoops   
)

Definition at line 716 of file floyd.cc.

References seed.

◆ TEST() [31/34]

◆ TEST() [32/34]

TEST ( FloydUndirected  ,
ANegativeArcIsANegativeCycle   
)

◆ TEST() [33/34]

TEST ( FloydUndirected  ,
PathsGoBothWaysAlongTheArcs   
)

◆ TEST() [34/34]

TEST ( FloydUtility  ,
entry_formats_distances_correctly   
)