Aleph-w 3.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 <limits>
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_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, 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 51 of file tpl_matgraph_test.cc.

◆ IntGraph

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

Definition at line 50 of file tpl_matgraph_test.cc.

◆ StringGraph

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

Definition at line 52 of file tpl_matgraph_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 746 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST() [1/8]

TEST ( MatgraphDetailTest  ,
CheckedIndexArrayOutOfRange   
)

◆ TEST() [2/8]

TEST ( MatgraphDetailTest  ,
CheckedIndexArrayValid   
)

◆ TEST() [3/8]

TEST ( MatgraphDetailTest  ,
IndexArray   
)

Definition at line 112 of file tpl_matgraph_test.cc.

References Aleph::matgraph_detail::index_array(), and Aleph::maps().

◆ TEST() [4/8]

◆ TEST() [5/8]

TEST ( MatGraphEdgeCases  ,
DisconnectedGraph   
)

◆ TEST() [6/8]

TEST ( MatGraphEdgeCases  ,
SelfLoop   
)

Definition at line 701 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST() [7/8]

TEST ( MatGraphEdgeCases  ,
SingleNodeGraph   
)

◆ TEST() [8/8]

TEST ( MatGraphStress  ,
LargeGraph   
)

◆ TEST_F() [1/40]

TEST_F ( AdyMatTest  ,
AccessByIndices   
)

Definition at line 380 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [2/40]

TEST_F ( AdyMatTest  ,
AccessByNodes   
)

Definition at line 391 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [3/40]

TEST_F ( AdyMatTest  ,
ConstAccess   
)

Definition at line 399 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [4/40]

◆ TEST_F() [5/40]

TEST_F ( AdyMatTest  ,
ConstructorWithoutNull   
)

◆ TEST_F() [6/40]

TEST_F ( AdyMatTest  ,
GetIndexByNode   
)

Definition at line 364 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [7/40]

TEST_F ( AdyMatTest  ,
GetListGraph   
)

◆ TEST_F() [8/40]

TEST_F ( AdyMatTest  ,
GetNodeByIndex   
)

Definition at line 355 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [9/40]

TEST_F ( AdyMatTest  ,
OperateAllArcsListGraph   
)

◆ TEST_F() [10/40]

TEST_F ( AdyMatTest  ,
OperateAllArcsMatrix   
)

◆ TEST_F() [11/40]

◆ TEST_F() [12/40]

TEST_F ( BitMatGraphTest  ,
AccessByNodes   
)

Definition at line 561 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [13/40]

TEST_F ( BitMatGraphTest  ,
AssignmentOperator   
)

Definition at line 589 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [14/40]

TEST_F ( BitMatGraphTest  ,
CheckConnectivity   
)

Definition at line 526 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [15/40]

◆ TEST_F() [16/40]

◆ TEST_F() [17/40]

TEST_F ( BitMatGraphTest  ,
CopyConstructor   
)

Definition at line 578 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [18/40]

◆ TEST_F() [19/40]

TEST_F ( BitMatGraphTest  ,
GetIndexByNode   
)

Definition at line 512 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [20/40]

TEST_F ( BitMatGraphTest  ,
GetNodeByIndex   
)

Definition at line 504 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [21/40]

TEST_F ( BitMatGraphTest  ,
ModifyEntries   
)

Definition at line 546 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [22/40]

TEST_F ( BitMatGraphTest  ,
NoGraphThrows   
)

Definition at line 598 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [23/40]

◆ TEST_F() [24/40]

TEST_F ( DigraphMatrixTest  ,
BitMatDirected   
)

Definition at line 631 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [25/40]

TEST_F ( DigraphMatrixTest  ,
MapMatrixDirected   
)

Definition at line 614 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [26/40]

TEST_F ( MapMatrixGraphTest  ,
AssignmentOperator   
)

Definition at line 234 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [27/40]

TEST_F ( MapMatrixGraphTest  ,
Constructor   
)

◆ TEST_F() [28/40]

TEST_F ( MapMatrixGraphTest  ,
CopyConstructor   
)

Definition at line 225 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [29/40]

TEST_F ( MapMatrixGraphTest  ,
GetArcByIndices   
)

Definition at line 183 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [30/40]

TEST_F ( MapMatrixGraphTest  ,
GetArcByNodes   
)

Definition at line 207 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [31/40]

TEST_F ( MapMatrixGraphTest  ,
GetIndexByNode   
)

Definition at line 159 of file tpl_matgraph_test.cc.

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

◆ TEST_F() [32/40]

TEST_F ( MapMatrixGraphTest  ,
GetListGraph   
)

◆ TEST_F() [33/40]

TEST_F ( MapMatrixGraphTest  ,
GetNodeByIndex   
)

Definition at line 148 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [34/40]

TEST_F ( MapMatrixGraphTest  ,
OutOfRangeIndex   
)

Definition at line 246 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [35/40]

◆ TEST_F() [36/40]

TEST_F ( MatrixGraphTest  ,
CopyConstructor   
)

Definition at line 325 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [37/40]

TEST_F ( MatrixGraphTest  ,
GetArcAttribute   
)

Definition at line 283 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [38/40]

TEST_F ( MatrixGraphTest  ,
GetNodeAttribute   
)

Definition at line 267 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [39/40]

TEST_F ( MatrixGraphTest  ,
ModifyEntry   
)

Definition at line 317 of file tpl_matgraph_test.cc.

References Aleph::maps().

◆ TEST_F() [40/40]

TEST_F ( MatrixGraphTest  ,
NoArcReturnsNull   
)

Definition at line 303 of file tpl_matgraph_test.cc.

References Aleph::maps().