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

Comprehensive tests for adjacency matrix graph classes. More...

#include <gtest/gtest.h>
#include <tpl_matgraph.H>
#include <tpl_graph.H>
#include <algorithm>
#include <limits>
#include <utility>
#include <vector>
Include dependency graph for tpl_matgraph_test.cc:

Go to the source code of this file.

Classes

class  MatGraphTestBase
 
class  DigraphTestBase
 
class  MapMatrixGraphTest
 
class  MatrixGraphTest
 
class  AdyMatTest
 
struct  InitFromArc
 
struct  InitAll
 
class  BitMatGraphTest
 
class  DigraphMatrixTest
 

Typedefs

using IntGraph = List_Graph< Graph_Node< int >, Graph_Arc< int > >
 
using IntDigraph = List_Digraph< Graph_Node< int >, Graph_Arc< int > >
 
using StringGraph = List_Graph< Graph_Node< std::string >, Graph_Arc< double > >
 

Functions

 TEST (MatgraphDetailTest, IndexArray)
 
 TEST (MatgraphDetailTest, CheckedIndexArrayValid)
 
 TEST (MatgraphDetailTest, CheckedIndexArrayOutOfRange)
 
 TEST_F (MapMatrixGraphTest, Constructor)
 
 TEST_F (MapMatrixGraphTest, GetNodeByIndex)
 
 TEST_F (MapMatrixGraphTest, GetIndexByNode)
 
 TEST_F (MapMatrixGraphTest, GetArcByIndices)
 
 TEST_F (MapMatrixGraphTest, GetArcByNodes)
 
 TEST_F (MapMatrixGraphTest, GetListGraph)
 
 TEST_F (MapMatrixGraphTest, CopyConstructor)
 
 TEST_F (MapMatrixGraphTest, AssignmentOperator)
 
 TEST_F (MapMatrixGraphTest, OutOfRangeIndex)
 
 TEST_F (MatrixGraphTest, Constructor)
 
 TEST_F (MatrixGraphTest, GetNodeAttribute)
 
 TEST_F (MatrixGraphTest, GetArcAttribute)
 
 TEST_F (MatrixGraphTest, NoArcReturnsNull)
 
 TEST_F (MatrixGraphTest, ModifyEntry)
 
 TEST_F (MatrixGraphTest, CopyConstructor)
 
 TEST_F (AdyMatTest, ConstructorWithoutNull)
 
 TEST_F (AdyMatTest, ConstructorWithNull)
 
 TEST_F (AdyMatTest, GetNodeByIndex)
 
 TEST_F (AdyMatTest, GetIndexByNode)
 
 TEST_F (AdyMatTest, AccessByIndices)
 
 TEST_F (AdyMatTest, AccessByNodes)
 
 TEST_F (AdyMatTest, ConstAccess)
 
 TEST_F (AdyMatTest, GetListGraph)
 
 TEST_F (AdyMatTest, SetNullValue)
 
 TEST_F (AdyMatTest, OperateAllArcsListGraph)
 
 TEST_F (AdyMatTest, OperateAllArcsMatrix)
 
 TEST (AdyMatArcs, BothOverloadsTouchTheEntriesOfTheArcs)
 
 TEST (AdyMatArcs, TheFilterObjectChoosesTheArcs)
 
 TEST (AdyMatArcs, ACopyKeepsTheEntriesTheNullValueAndTheFilter)
 
 TEST_F (BitMatGraphTest, DefaultConstructor)
 
 TEST_F (BitMatGraphTest, ConstructFromGraph)
 
 TEST_F (BitMatGraphTest, ConstructWithDimension)
 
 TEST_F (BitMatGraphTest, GetNodeByIndex)
 
 TEST_F (BitMatGraphTest, GetIndexByNode)
 
 TEST_F (BitMatGraphTest, CheckConnectivity)
 
 TEST_F (BitMatGraphTest, ModifyEntries)
 
 TEST_F (BitMatGraphTest, AccessByNodes)
 
 TEST_F (BitMatGraphTest, SetListGraph)
 
 TEST_F (BitMatGraphTest, AnotherGraphKeepsNoBitOfTheFormer)
 
 TEST_F (BitMatGraphTest, TheFilterObjectChoosesTheArcs)
 
 TEST_F (BitMatGraphTest, AssigningItsOwnGraphTakesTheDefaultFilter)
 
 TEST_F (BitMatGraphTest, CopyConstructor)
 
 TEST_F (BitMatGraphTest, AssignmentOperator)
 
 TEST_F (BitMatGraphTest, NoGraphThrows)
 
 TEST_F (DigraphMatrixTest, MapMatrixDirected)
 
 TEST_F (DigraphMatrixTest, BitMatDirected)
 
 TEST (MatGraphEdgeCases, SingleNodeGraph)
 
 TEST (MatGraphEdgeCases, DisconnectedGraph)
 
 TEST (MatGraphEdgeCases, CompleteGraph)
 
 TEST (MatGraphEdgeCases, SelfLoop)
 
 TEST (MatGraphStress, LargeGraph)
 
int main (int argc, char **argv)
 

Detailed Description

Comprehensive tests for adjacency matrix graph classes.

Definition in file tpl_matgraph_test.cc.

Typedef Documentation

◆ IntDigraph

Definition at line 54 of file tpl_matgraph_test.cc.

◆ IntGraph

using IntGraph = List_Graph<Graph_Node<int>, Graph_Arc<int> >

Definition at line 53 of file tpl_matgraph_test.cc.

◆ StringGraph

using StringGraph = List_Graph<Graph_Node<std::string>, Graph_Arc<double> >

Definition at line 55 of file tpl_matgraph_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 971 of file tpl_matgraph_test.cc.

◆ TEST() [1/11]

TEST ( AdyMatArcs  ,
ACopyKeepsTheEntriesTheNullValueAndTheFilter   
)

◆ TEST() [2/11]

TEST ( AdyMatArcs  ,
BothOverloadsTouchTheEntriesOfTheArcs   
)

Definition at line 561 of file tpl_matgraph_test.cc.

◆ TEST() [3/11]

TEST ( AdyMatArcs  ,
TheFilterObjectChoosesTheArcs   
)

Definition at line 580 of file tpl_matgraph_test.cc.

References Aleph::bits().

◆ TEST() [4/11]

TEST ( MatgraphDetailTest  ,
CheckedIndexArrayOutOfRange   
)

◆ TEST() [5/11]

TEST ( MatgraphDetailTest  ,
CheckedIndexArrayValid   
)

◆ TEST() [6/11]

TEST ( MatgraphDetailTest  ,
IndexArray   
)

Definition at line 115 of file tpl_matgraph_test.cc.

References Aleph::matgraph_detail::index_array().

◆ TEST() [7/11]

◆ TEST() [8/11]

TEST ( MatGraphEdgeCases  ,
DisconnectedGraph   
)

◆ TEST() [9/11]

TEST ( MatGraphEdgeCases  ,
SelfLoop   
)

Definition at line 926 of file tpl_matgraph_test.cc.

◆ TEST() [10/11]

◆ TEST() [11/11]

◆ TEST_F() [1/43]

TEST_F ( AdyMatTest  ,
AccessByIndices   
)

Definition at line 383 of file tpl_matgraph_test.cc.

◆ TEST_F() [2/43]

TEST_F ( AdyMatTest  ,
AccessByNodes   
)

Definition at line 394 of file tpl_matgraph_test.cc.

◆ TEST_F() [3/43]

TEST_F ( AdyMatTest  ,
ConstAccess   
)

Definition at line 402 of file tpl_matgraph_test.cc.

◆ TEST_F() [4/43]

◆ TEST_F() [5/43]

TEST_F ( AdyMatTest  ,
ConstructorWithoutNull   
)

◆ TEST_F() [6/43]

TEST_F ( AdyMatTest  ,
GetIndexByNode   
)

Definition at line 367 of file tpl_matgraph_test.cc.

◆ TEST_F() [7/43]

TEST_F ( AdyMatTest  ,
GetListGraph   
)

◆ TEST_F() [8/43]

TEST_F ( AdyMatTest  ,
GetNodeByIndex   
)

Definition at line 358 of file tpl_matgraph_test.cc.

◆ TEST_F() [9/43]

TEST_F ( AdyMatTest  ,
OperateAllArcsListGraph   
)

◆ TEST_F() [10/43]

TEST_F ( AdyMatTest  ,
OperateAllArcsMatrix   
)

◆ TEST_F() [11/43]

◆ TEST_F() [12/43]

TEST_F ( BitMatGraphTest  ,
AccessByNodes   
)

Definition at line 717 of file tpl_matgraph_test.cc.

◆ TEST_F() [13/43]

TEST_F ( BitMatGraphTest  ,
AnotherGraphKeepsNoBitOfTheFormer   
)

◆ TEST_F() [14/43]

TEST_F ( BitMatGraphTest  ,
AssigningItsOwnGraphTakesTheDefaultFilter   
)

◆ TEST_F() [15/43]

TEST_F ( BitMatGraphTest  ,
AssignmentOperator   
)

◆ TEST_F() [16/43]

TEST_F ( BitMatGraphTest  ,
CheckConnectivity   
)

Definition at line 682 of file tpl_matgraph_test.cc.

◆ TEST_F() [17/43]

TEST_F ( BitMatGraphTest  ,
ConstructFromGraph   
)

◆ TEST_F() [18/43]

TEST_F ( BitMatGraphTest  ,
ConstructWithDimension   
)

◆ TEST_F() [19/43]

TEST_F ( BitMatGraphTest  ,
CopyConstructor   
)

◆ TEST_F() [20/43]

TEST_F ( BitMatGraphTest  ,
DefaultConstructor   
)

◆ TEST_F() [21/43]

TEST_F ( BitMatGraphTest  ,
GetIndexByNode   
)

Definition at line 668 of file tpl_matgraph_test.cc.

◆ TEST_F() [22/43]

TEST_F ( BitMatGraphTest  ,
GetNodeByIndex   
)

Definition at line 660 of file tpl_matgraph_test.cc.

◆ TEST_F() [23/43]

TEST_F ( BitMatGraphTest  ,
ModifyEntries   
)

Definition at line 702 of file tpl_matgraph_test.cc.

◆ TEST_F() [24/43]

TEST_F ( BitMatGraphTest  ,
NoGraphThrows   
)

Definition at line 823 of file tpl_matgraph_test.cc.

◆ TEST_F() [25/43]

◆ TEST_F() [26/43]

TEST_F ( BitMatGraphTest  ,
TheFilterObjectChoosesTheArcs   
)

Definition at line 762 of file tpl_matgraph_test.cc.

References GTArcCommon< ArcInfo >::get_info().

◆ TEST_F() [27/43]

TEST_F ( DigraphMatrixTest  ,
BitMatDirected   
)

Definition at line 856 of file tpl_matgraph_test.cc.

◆ TEST_F() [28/43]

TEST_F ( DigraphMatrixTest  ,
MapMatrixDirected   
)

Definition at line 839 of file tpl_matgraph_test.cc.

◆ TEST_F() [29/43]

◆ TEST_F() [30/43]

TEST_F ( MapMatrixGraphTest  ,
Constructor   
)

◆ TEST_F() [31/43]

◆ TEST_F() [32/43]

TEST_F ( MapMatrixGraphTest  ,
GetArcByIndices   
)

Definition at line 186 of file tpl_matgraph_test.cc.

◆ TEST_F() [33/43]

TEST_F ( MapMatrixGraphTest  ,
GetArcByNodes   
)

Definition at line 210 of file tpl_matgraph_test.cc.

◆ TEST_F() [34/43]

TEST_F ( MapMatrixGraphTest  ,
GetIndexByNode   
)

Definition at line 162 of file tpl_matgraph_test.cc.

◆ TEST_F() [35/43]

TEST_F ( MapMatrixGraphTest  ,
GetListGraph   
)

◆ TEST_F() [36/43]

TEST_F ( MapMatrixGraphTest  ,
GetNodeByIndex   
)

Definition at line 151 of file tpl_matgraph_test.cc.

◆ TEST_F() [37/43]

TEST_F ( MapMatrixGraphTest  ,
OutOfRangeIndex   
)

Definition at line 249 of file tpl_matgraph_test.cc.

◆ TEST_F() [38/43]

◆ TEST_F() [39/43]

TEST_F ( MatrixGraphTest  ,
CopyConstructor   
)

◆ TEST_F() [40/43]

TEST_F ( MatrixGraphTest  ,
GetArcAttribute   
)

Definition at line 286 of file tpl_matgraph_test.cc.

◆ TEST_F() [41/43]

TEST_F ( MatrixGraphTest  ,
GetNodeAttribute   
)

Definition at line 270 of file tpl_matgraph_test.cc.

◆ TEST_F() [42/43]

TEST_F ( MatrixGraphTest  ,
ModifyEntry   
)

Definition at line 320 of file tpl_matgraph_test.cc.

◆ TEST_F() [43/43]

TEST_F ( MatrixGraphTest  ,
NoArcReturnsNull   
)

Definition at line 306 of file tpl_matgraph_test.cc.