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

Tests for Tarjan. More...

#include <gtest/gtest.h>
#include <tpl_graph.H>
#include <Tarjan.H>
Include dependency graph for tarjan_test.cc:

Go to the source code of this file.

Classes

struct  SkipWeightZeroArcs
 

Typedefs

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

Functions

TestDigraph::Nodeadd_node (TestDigraph &g, int value)
 
TestDigraph::Arcadd_arc (TestDigraph &g, TestDigraph::Node *src, TestDigraph::Node *tgt, int value=0)
 
 TEST (TarjanTest, EmptyGraph)
 
 TEST (TarjanTest, SingleNodeNoLoop)
 
 TEST (TarjanTest, SingleNodeWithLoop)
 
 TEST (TarjanTest, TwoNodesNoCycle)
 
 TEST (TarjanTest, TwoNodesWithCycle)
 
 TEST (TarjanTest, LinearChain)
 
 TEST (TarjanTest, SimpleCycle)
 
 TEST (TarjanTest, MultipleSCCs)
 
 TEST (TarjanTest, ConnectedComponentsWithArcs)
 
 TEST (TarjanTest, ComputeCycleFromSource)
 
 TEST (TarjanTest, ComputeCycleInTestDigraphClass)
 
 TEST (TarjanTest, DiamondDAG)
 
 TEST (TarjanTest, ComplexNestedCycles)
 
 TEST (TarjanTest, DynDlistOverloads)
 
 TEST (TarjanTest, DisconnectedComponents)
 
 TEST (TarjanTest, LargeCycle)
 
 TEST (TarjanTest, SCCTree)
 
 TEST (TarjanTest, NumConnectedComponents)
 
 TEST (TarjanTest, NullSourceValidation)
 
 TEST (TarjanTest, FilterAccessor)
 
 TEST (TarjanTest, StateGetters)
 
 TEST (TarjanTest, MoveSemantics)
 
 TEST (TarjanTest, CustomArcFilter)
 
 TEST (TarjanTest, LargeGraphStress)
 
 TEST (TarjanTest, MultipleDisjointCycles)
 
 TEST (TarjanTest, CyclePathVerification)
 
 TEST (TarjanTest, CompleteDigraph)
 
 TEST (TarjanTest, ReuseInstance)
 
 TEST (TarjanExtended, StarGraphOutward)
 
 TEST (TarjanExtended, StarGraphInward)
 
 TEST (TarjanExtended, WheelGraph)
 
 TEST (TarjanExtended, BinaryTreeDAG)
 
 TEST (TarjanExtended, MultipleSelfLoops)
 
 TEST (TarjanExtended, ChainOfSCCs)
 
 TEST (TarjanExtended, DiamondPatternSCCs)
 
 TEST (TarjanExtended, BipartiteDAG)
 
 TEST (TarjanExtended, StronglyConnectedBipartite)
 
 TEST (TarjanExtended, GridDAG)
 
 TEST (TarjanExtended, GridWithCycles)
 
 TEST (TarjanExtended, DeepLinearChain)
 
 TEST (TarjanExtended, ConsistencyBetweenOverloads)
 
 TEST (TarjanExtended, CycleDetectionConsistency)
 
 TEST (TarjanExtended, LargeSCC)
 
 TEST (TarjanExtended, ManySmallSCCs)
 
 TEST (TarjanExtended, CyclePathDetails)
 
 TEST (TarjanExtended, EmptyGraphEdgeCases)
 
 TEST (TarjanExtended, ParallelArcs)
 
 TEST (TarjanExtended, TournamentGraph)
 
 TEST (TarjanExtended, DenseGraph)
 
 TEST (TarjanExtended, ComputeCycleNoCycle)
 

Detailed Description

Tests for Tarjan.

Definition in file tarjan_test.cc.

Typedef Documentation

◆ TestDigraph

Definition at line 44 of file tarjan_test.cc.

Function Documentation

◆ add_arc()

◆ add_node()

◆ TEST() [1/50]

TEST ( TarjanExtended  ,
BinaryTreeDAG   
)

Definition at line 1032 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), nodes, and Aleph::HTList::size().

◆ TEST() [2/50]

TEST ( TarjanExtended  ,
BipartiteDAG   
)

Definition at line 1175 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [3/50]

TEST ( TarjanExtended  ,
ChainOfSCCs   
)

Definition at line 1091 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [4/50]

TEST ( TarjanExtended  ,
ComputeCycleNoCycle   
)

Definition at line 1629 of file tarjan_test.cc.

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

◆ TEST() [5/50]

TEST ( TarjanExtended  ,
ConsistencyBetweenOverloads   
)

Definition at line 1333 of file tarjan_test.cc.

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

◆ TEST() [6/50]

TEST ( TarjanExtended  ,
CycleDetectionConsistency   
)

Definition at line 1399 of file tarjan_test.cc.

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

◆ TEST() [7/50]

TEST ( TarjanExtended  ,
CyclePathDetails   
)

◆ TEST() [8/50]

TEST ( TarjanExtended  ,
DeepLinearChain   
)

Definition at line 1311 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), and nodes.

◆ TEST() [9/50]

TEST ( TarjanExtended  ,
DenseGraph   
)

Definition at line 1601 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), N, nodes, and Aleph::HTList::size().

◆ TEST() [10/50]

TEST ( TarjanExtended  ,
DiamondPatternSCCs   
)

Definition at line 1131 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [11/50]

TEST ( TarjanExtended  ,
EmptyGraphEdgeCases   
)

Definition at line 1517 of file tarjan_test.cc.

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

◆ TEST() [12/50]

TEST ( TarjanExtended  ,
GridDAG   
)

Definition at line 1238 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [13/50]

TEST ( TarjanExtended  ,
GridWithCycles   
)

Definition at line 1271 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [14/50]

TEST ( TarjanExtended  ,
LargeSCC   
)

◆ TEST() [15/50]

TEST ( TarjanExtended  ,
ManySmallSCCs   
)

Definition at line 1457 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [16/50]

TEST ( TarjanExtended  ,
MultipleSelfLoops   
)

Definition at line 1068 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), and N.

◆ TEST() [17/50]

TEST ( TarjanExtended  ,
ParallelArcs   
)

Definition at line 1540 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [18/50]

TEST ( TarjanExtended  ,
StarGraphInward   
)

Definition at line 980 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), and N.

◆ TEST() [19/50]

TEST ( TarjanExtended  ,
StarGraphOutward   
)

Definition at line 956 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), and N.

◆ TEST() [20/50]

TEST ( TarjanExtended  ,
StronglyConnectedBipartite   
)

Definition at line 1205 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [21/50]

TEST ( TarjanExtended  ,
TournamentGraph   
)

Definition at line 1569 of file tarjan_test.cc.

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

◆ TEST() [22/50]

TEST ( TarjanExtended  ,
WheelGraph   
)

Definition at line 1002 of file tarjan_test.cc.

References add_arc(), add_node(), Aleph::maps(), and N.

◆ TEST() [23/50]

TEST ( TarjanTest  ,
CompleteDigraph   
)

Definition at line 896 of file tarjan_test.cc.

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

◆ TEST() [24/50]

◆ TEST() [25/50]

TEST ( TarjanTest  ,
ComputeCycleFromSource   
)

Definition at line 378 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [26/50]

TEST ( TarjanTest  ,
ComputeCycleInTestDigraphClass   
)

◆ TEST() [27/50]

TEST ( TarjanTest  ,
ConnectedComponentsWithArcs   
)

Definition at line 330 of file tarjan_test.cc.

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

◆ TEST() [28/50]

TEST ( TarjanTest  ,
CustomArcFilter   
)

Definition at line 773 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [29/50]

◆ TEST() [30/50]

TEST ( TarjanTest  ,
DiamondDAG   
)

Definition at line 433 of file tarjan_test.cc.

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

◆ TEST() [31/50]

TEST ( TarjanTest  ,
DisconnectedComponents   
)

Definition at line 523 of file tarjan_test.cc.

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

◆ TEST() [32/50]

TEST ( TarjanTest  ,
DynDlistOverloads   
)

◆ TEST() [33/50]

TEST ( TarjanTest  ,
EmptyGraph   
)

◆ TEST() [34/50]

TEST ( TarjanTest  ,
FilterAccessor   
)

Definition at line 701 of file tarjan_test.cc.

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

◆ TEST() [35/50]

TEST ( TarjanTest  ,
LargeCycle   
)

◆ TEST() [36/50]

TEST ( TarjanTest  ,
LargeGraphStress   
)

Definition at line 797 of file tarjan_test.cc.

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

◆ TEST() [37/50]

TEST ( TarjanTest  ,
LinearChain   
)

Definition at line 229 of file tarjan_test.cc.

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

◆ TEST() [38/50]

TEST ( TarjanTest  ,
MoveSemantics   
)

Definition at line 738 of file tarjan_test.cc.

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

◆ TEST() [39/50]

TEST ( TarjanTest  ,
MultipleDisjointCycles   
)

Definition at line 826 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [40/50]

TEST ( TarjanTest  ,
MultipleSCCs   
)

Definition at line 284 of file tarjan_test.cc.

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

◆ TEST() [41/50]

TEST ( TarjanTest  ,
NullSourceValidation   
)

Definition at line 687 of file tarjan_test.cc.

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

◆ TEST() [42/50]

TEST ( TarjanTest  ,
NumConnectedComponents   
)

Definition at line 659 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [43/50]

TEST ( TarjanTest  ,
ReuseInstance   
)

Definition at line 922 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [44/50]

TEST ( TarjanTest  ,
SCCTree   
)

Definition at line 614 of file tarjan_test.cc.

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

◆ TEST() [45/50]

◆ TEST() [46/50]

TEST ( TarjanTest  ,
SingleNodeNoLoop   
)

◆ TEST() [47/50]

◆ TEST() [48/50]

TEST ( TarjanTest  ,
StateGetters   
)

Definition at line 715 of file tarjan_test.cc.

References add_arc(), add_node(), and Aleph::maps().

◆ TEST() [49/50]

TEST ( TarjanTest  ,
TwoNodesNoCycle   
)

Definition at line 163 of file tarjan_test.cc.

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

◆ TEST() [50/50]