Aleph-w 3.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 <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)
 

Detailed Description

Tests for Floyd.

Definition in file floyd.cc.

Typedef Documentation

◆ GArc

using GArc = Grafo::Arc

Definition at line 49 of file floyd.cc.

◆ GNode

using GNode = Grafo::Node

Definition at line 48 of file floyd.cc.

◆ Grafo

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

Definition at line 47 of file floyd.cc.

Function Documentation

◆ TEST() [1/13]

TEST ( FloydBasicGraph  ,
computes_correct_distances   
)

Definition at line 72 of file floyd.cc.

References Aleph::maps().

◆ TEST() [2/13]

TEST ( FloydBasicGraph  ,
handles_unreachable_nodes   
)

Definition at line 110 of file floyd.cc.

References Aleph::HTList::is_empty(), and Aleph::maps().

◆ TEST() [3/13]

TEST ( FloydIndexNode  ,
finds_correct_indices   
)

Definition at line 184 of file floyd.cc.

References Aleph::maps(), and nodes.

◆ TEST() [4/13]

TEST ( FloydIndexNode  ,
throws_on_null_pointer   
)

Definition at line 206 of file floyd.cc.

References Aleph::maps().

◆ TEST() [5/13]

TEST ( FloydLargeGraph  ,
handles_complete_graph   
)

Definition at line 325 of file floyd.cc.

References Aleph::maps(), N, and nodes.

◆ TEST() [6/13]

TEST ( FloydMatrices  ,
path_matrix_has_correct_structure   
)

Definition at line 287 of file floyd.cc.

References Aleph::maps().

◆ TEST() [7/13]

TEST ( FloydNegativeCycle  ,
detects_negative_cycles   
)

Definition at line 166 of file floyd.cc.

References Aleph::maps().

◆ TEST() [8/13]

TEST ( FloydNegativeWeights  ,
handles_negative_weights_without_cycles   
)

Definition at line 135 of file floyd.cc.

References Aleph::maps().

◆ TEST() [9/13]

TEST ( FloydPathReconstruction  ,
handles_self_paths   
)

Definition at line 262 of file floyd.cc.

References Aleph::maps().

◆ TEST() [10/13]

TEST ( FloydPathReconstruction  ,
returns_valid_path   
)

Definition at line 233 of file floyd.cc.

References Aleph::maps().

◆ TEST() [11/13]

TEST ( FloydPathReconstruction  ,
throws_on_invalid_indices   
)

Definition at line 217 of file floyd.cc.

References Aleph::maps().

◆ TEST() [12/13]

TEST ( FloydStress  ,
handles_single_node_graph   
)

Definition at line 360 of file floyd.cc.

References Aleph::maps().

◆ TEST() [13/13]

TEST ( FloydUtility  ,
entry_formats_distances_correctly   
)

Definition at line 274 of file floyd.cc.

References Aleph::maps().