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

Tests for Topological Sort. More...

#include <gtest/gtest.h>
#include <set>
#include <map>
#include <string>
#include <topological_sort.H>
#include <tpl_graph.H>
Include dependency graph for topological_sort_test.cc:

Go to the source code of this file.

Typedefs

using TestDigraph = Aleph::List_Digraph< Aleph::Graph_Node< std::string >, Aleph::Graph_Arc< int > >
 

Functions

template<class List >
bool is_valid_topological_order (const TestDigraph &g, const List &order)
 
 TEST (TopologicalSortDFS, EmptyGraph)
 
 TEST (TopologicalSortDFS, SingleNode)
 
 TEST (TopologicalSortDFS, TwoNodesOneArc)
 
 TEST (TopologicalSortDFS, LinearChain)
 
 TEST (TopologicalSortDFS, DiamondDAG)
 
 TEST (TopologicalSortDFS, DisconnectedComponents)
 
 TEST (TopologicalSortDFS, ComplexDAG)
 
 TEST (TopologicalSortDFS, OperatorOverload)
 
 TEST (QTopologicalSortBFS, EmptyGraph)
 
 TEST (QTopologicalSortBFS, SingleNode)
 
 TEST (QTopologicalSortBFS, TwoNodesOneArc)
 
 TEST (QTopologicalSortBFS, LinearChain)
 
 TEST (QTopologicalSortBFS, DiamondDAG)
 
 TEST (QTopologicalSortRanks, EmptyGraph)
 
 TEST (QTopologicalSortRanks, SingleNode)
 
 TEST (QTopologicalSortRanks, LinearChain)
 
 TEST (QTopologicalSortRanks, ParallelNodes)
 
 TEST (QTopologicalSortRanks, DiamondRanks)
 
 TEST (QTopologicalSortRanks, DisconnectedComponents)
 
 TEST (QTopologicalSortOperators, PerformOverload)
 
 TEST (QTopologicalSortOperators, RanksOverloadDynDlist)
 
 TEST (QTopologicalSortOperators, RanksOverloadDynList)
 
 TEST (TopologicalSortStress, LargeDAG)
 
 TEST (TopologicalSortStress, WideDAG)
 
 TEST (TopologicalSortComparison, BothAlgorithmsProduceValidOrder)
 

Detailed Description

Tests for Topological Sort.

Definition in file topological_sort_test.cc.

Typedef Documentation

◆ TestDigraph

Definition at line 46 of file topological_sort_test.cc.

Function Documentation

◆ is_valid_topological_order()

template<class List >
bool is_valid_topological_order ( const TestDigraph g,
const List &  order 
)

◆ TEST() [1/25]

TEST ( QTopologicalSortBFS  ,
DiamondDAG   
)

Definition at line 279 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [2/25]

TEST ( QTopologicalSortBFS  ,
EmptyGraph   
)

Definition at line 225 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [3/25]

TEST ( QTopologicalSortBFS  ,
LinearChain   
)

Definition at line 260 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [4/25]

TEST ( QTopologicalSortBFS  ,
SingleNode   
)

Definition at line 234 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [5/25]

TEST ( QTopologicalSortBFS  ,
TwoNodesOneArc   
)

Definition at line 246 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [6/25]

TEST ( QTopologicalSortOperators  ,
PerformOverload   
)

Definition at line 440 of file topological_sort_test.cc.

References Aleph::maps(), and Aleph::DynDlist< T >::size().

◆ TEST() [7/25]

TEST ( QTopologicalSortOperators  ,
RanksOverloadDynDlist   
)

Definition at line 454 of file topological_sort_test.cc.

References Aleph::maps(), and Aleph::DynDlist< T >::size().

◆ TEST() [8/25]

TEST ( QTopologicalSortOperators  ,
RanksOverloadDynList   
)

Definition at line 468 of file topological_sort_test.cc.

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

◆ TEST() [9/25]

TEST ( QTopologicalSortRanks  ,
DiamondRanks   
)

Definition at line 373 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [10/25]

TEST ( QTopologicalSortRanks  ,
DisconnectedComponents   
)

Definition at line 414 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [11/25]

TEST ( QTopologicalSortRanks  ,
EmptyGraph   
)

Definition at line 301 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [12/25]

TEST ( QTopologicalSortRanks  ,
LinearChain   
)

Definition at line 323 of file topological_sort_test.cc.

References Aleph::maps(), and nodes.

◆ TEST() [13/25]

TEST ( QTopologicalSortRanks  ,
ParallelNodes   
)

Definition at line 343 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [14/25]

TEST ( QTopologicalSortRanks  ,
SingleNode   
)

Definition at line 310 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [15/25]

TEST ( TopologicalSortComparison  ,
BothAlgorithmsProduceValidOrder   
)

◆ TEST() [16/25]

TEST ( TopologicalSortDFS  ,
ComplexDAG   
)

Definition at line 179 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [17/25]

TEST ( TopologicalSortDFS  ,
DiamondDAG   
)

Definition at line 134 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [18/25]

TEST ( TopologicalSortDFS  ,
DisconnectedComponents   
)

Definition at line 161 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [19/25]

TEST ( TopologicalSortDFS  ,
EmptyGraph   
)

Definition at line 77 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [20/25]

TEST ( TopologicalSortDFS  ,
LinearChain   
)

Definition at line 115 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [21/25]

TEST ( TopologicalSortDFS  ,
OperatorOverload   
)

◆ TEST() [22/25]

TEST ( TopologicalSortDFS  ,
SingleNode   
)

Definition at line 86 of file topological_sort_test.cc.

References Aleph::maps().

◆ TEST() [23/25]

TEST ( TopologicalSortDFS  ,
TwoNodesOneArc   
)

Definition at line 98 of file topological_sort_test.cc.

References is_valid_topological_order(), and Aleph::maps().

◆ TEST() [24/25]

TEST ( TopologicalSortStress  ,
LargeDAG   
)

◆ TEST() [25/25]

TEST ( TopologicalSortStress  ,
WideDAG   
)