|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
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>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) |
Comprehensive tests for adjacency matrix graph classes.
Definition in file tpl_matgraph_test.cc.
| using IntDigraph = List_Digraph<Graph_Node<int>, Graph_Arc<int> > |
Definition at line 54 of file tpl_matgraph_test.cc.
| using IntGraph = List_Graph<Graph_Node<int>, Graph_Arc<int> > |
Definition at line 53 of file tpl_matgraph_test.cc.
| using StringGraph = List_Graph<Graph_Node<std::string>, Graph_Arc<double> > |
Definition at line 55 of file tpl_matgraph_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 971 of file tpl_matgraph_test.cc.
| TEST | ( | AdyMatArcs | , |
| ACopyKeepsTheEntriesTheNullValueAndTheFilter | |||
| ) |
Definition at line 605 of file tpl_matgraph_test.cc.
References Aleph::copy(), h, and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | AdyMatArcs | , |
| BothOverloadsTouchTheEntriesOfTheArcs | |||
| ) |
Definition at line 561 of file tpl_matgraph_test.cc.
| TEST | ( | AdyMatArcs | , |
| TheFilterObjectChoosesTheArcs | |||
| ) |
Definition at line 580 of file tpl_matgraph_test.cc.
References Aleph::bits().
| TEST | ( | MatgraphDetailTest | , |
| CheckedIndexArrayOutOfRange | |||
| ) |
Definition at line 130 of file tpl_matgraph_test.cc.
References Aleph::matgraph_detail::checked_index_array().
| TEST | ( | MatgraphDetailTest | , |
| CheckedIndexArrayValid | |||
| ) |
Definition at line 124 of file tpl_matgraph_test.cc.
References Aleph::matgraph_detail::checked_index_array().
| TEST | ( | MatgraphDetailTest | , |
| IndexArray | |||
| ) |
Definition at line 115 of file tpl_matgraph_test.cc.
References Aleph::matgraph_detail::index_array().
| TEST | ( | MatGraphEdgeCases | , |
| CompleteGraph | |||
| ) |
Definition at line 904 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and nodes.
| TEST | ( | MatGraphEdgeCases | , |
| DisconnectedGraph | |||
| ) |
Definition at line 887 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | MatGraphEdgeCases | , |
| SelfLoop | |||
| ) |
Definition at line 926 of file tpl_matgraph_test.cc.
| TEST | ( | MatGraphEdgeCases | , |
| SingleNodeGraph | |||
| ) |
Definition at line 872 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::get_num_nodes(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | MatGraphStress | , |
| LargeGraph | |||
| ) |
Definition at line 942 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes(), N, nodes, and Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_list_graph().
| TEST_F | ( | AdyMatTest | , |
| AccessByIndices | |||
| ) |
Definition at line 383 of file tpl_matgraph_test.cc.
| TEST_F | ( | AdyMatTest | , |
| AccessByNodes | |||
| ) |
Definition at line 394 of file tpl_matgraph_test.cc.
| TEST_F | ( | AdyMatTest | , |
| ConstAccess | |||
| ) |
Definition at line 402 of file tpl_matgraph_test.cc.
| TEST_F | ( | AdyMatTest | , |
| ConstructorWithNull | |||
| ) |
Definition at line 351 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::get_num_nodes(), and Aleph::Ady_Mat< GT, __Entry_Type, SA >::null_value().
| TEST_F | ( | AdyMatTest | , |
| ConstructorWithoutNull | |||
| ) |
Definition at line 345 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::get_num_nodes().
| TEST_F | ( | AdyMatTest | , |
| GetIndexByNode | |||
| ) |
Definition at line 367 of file tpl_matgraph_test.cc.
| TEST_F | ( | AdyMatTest | , |
| GetListGraph | |||
| ) |
Definition at line 411 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::get_list_graph().
| TEST_F | ( | AdyMatTest | , |
| GetNodeByIndex | |||
| ) |
Definition at line 358 of file tpl_matgraph_test.cc.
| TEST_F | ( | AdyMatTest | , |
| OperateAllArcsListGraph | |||
| ) |
Definition at line 439 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_list_graph().
| TEST_F | ( | AdyMatTest | , |
| OperateAllArcsMatrix | |||
| ) |
Definition at line 467 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_matrix().
| TEST_F | ( | AdyMatTest | , |
| SetNullValue | |||
| ) |
Definition at line 417 of file tpl_matgraph_test.cc.
References Aleph::Ady_Mat< GT, __Entry_Type, SA >::null_value(), and Aleph::Ady_Mat< GT, __Entry_Type, SA >::set_null_value().
| TEST_F | ( | BitMatGraphTest | , |
| AccessByNodes | |||
| ) |
Definition at line 717 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| AnotherGraphKeepsNoBitOfTheFormer | |||
| ) |
Definition at line 736 of file tpl_matgraph_test.cc.
References Aleph::count(), h, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::Bit_Mat_Graph< GT, SA >::set_list_graph().
| TEST_F | ( | BitMatGraphTest | , |
| AssigningItsOwnGraphTakesTheDefaultFilter | |||
| ) |
Definition at line 783 of file tpl_matgraph_test.cc.
References GTArcCommon< ArcInfo >::get_info(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc().
| TEST_F | ( | BitMatGraphTest | , |
| AssignmentOperator | |||
| ) |
Definition at line 814 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | BitMatGraphTest | , |
| CheckConnectivity | |||
| ) |
Definition at line 682 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| ConstructFromGraph | |||
| ) |
Definition at line 646 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_list_graph(), and Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | BitMatGraphTest | , |
| ConstructWithDimension | |||
| ) |
Definition at line 653 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_list_graph(), and Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | BitMatGraphTest | , |
| CopyConstructor | |||
| ) |
Definition at line 803 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | BitMatGraphTest | , |
| DefaultConstructor | |||
| ) |
Definition at line 639 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_list_graph(), and Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | BitMatGraphTest | , |
| GetIndexByNode | |||
| ) |
Definition at line 668 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| GetNodeByIndex | |||
| ) |
Definition at line 660 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| ModifyEntries | |||
| ) |
Definition at line 702 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| NoGraphThrows | |||
| ) |
Definition at line 823 of file tpl_matgraph_test.cc.
| TEST_F | ( | BitMatGraphTest | , |
| SetListGraph | |||
| ) |
Definition at line 725 of file tpl_matgraph_test.cc.
References Aleph::Bit_Mat_Graph< GT, SA >::get_num_nodes(), and Aleph::Bit_Mat_Graph< GT, SA >::set_list_graph().
| TEST_F | ( | BitMatGraphTest | , |
| TheFilterObjectChoosesTheArcs | |||
| ) |
Definition at line 762 of file tpl_matgraph_test.cc.
References GTArcCommon< ArcInfo >::get_info().
| TEST_F | ( | DigraphMatrixTest | , |
| BitMatDirected | |||
| ) |
Definition at line 856 of file tpl_matgraph_test.cc.
| TEST_F | ( | DigraphMatrixTest | , |
| MapMatrixDirected | |||
| ) |
Definition at line 839 of file tpl_matgraph_test.cc.
| TEST_F | ( | MapMatrixGraphTest | , |
| AssignmentOperator | |||
| ) |
Definition at line 237 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST_F | ( | MapMatrixGraphTest | , |
| Constructor | |||
| ) |
Definition at line 145 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | MapMatrixGraphTest | , |
| CopyConstructor | |||
| ) |
Definition at line 228 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_list_graph(), and Aleph::Map_Matrix_Graph< GT, SA >::get_num_nodes().
| TEST_F | ( | MapMatrixGraphTest | , |
| GetArcByIndices | |||
| ) |
Definition at line 186 of file tpl_matgraph_test.cc.
| TEST_F | ( | MapMatrixGraphTest | , |
| GetArcByNodes | |||
| ) |
Definition at line 210 of file tpl_matgraph_test.cc.
| TEST_F | ( | MapMatrixGraphTest | , |
| GetIndexByNode | |||
| ) |
Definition at line 162 of file tpl_matgraph_test.cc.
| TEST_F | ( | MapMatrixGraphTest | , |
| GetListGraph | |||
| ) |
Definition at line 222 of file tpl_matgraph_test.cc.
References Aleph::Map_Matrix_Graph< GT, SA >::get_list_graph().
| TEST_F | ( | MapMatrixGraphTest | , |
| GetNodeByIndex | |||
| ) |
Definition at line 151 of file tpl_matgraph_test.cc.
| TEST_F | ( | MapMatrixGraphTest | , |
| OutOfRangeIndex | |||
| ) |
Definition at line 249 of file tpl_matgraph_test.cc.
| TEST_F | ( | MatrixGraphTest | , |
| Constructor | |||
| ) |
Definition at line 263 of file tpl_matgraph_test.cc.
References Aleph::Matrix_Graph< GT, SA >::get_num_nodes(), and Aleph::Matrix_Graph< GT, SA >::null_value().
| TEST_F | ( | MatrixGraphTest | , |
| CopyConstructor | |||
| ) |
Definition at line 328 of file tpl_matgraph_test.cc.
References Aleph::Matrix_Graph< GT, SA >::get_num_nodes(), and Aleph::Matrix_Graph< GT, SA >::null_value().
| TEST_F | ( | MatrixGraphTest | , |
| GetArcAttribute | |||
| ) |
Definition at line 286 of file tpl_matgraph_test.cc.
| TEST_F | ( | MatrixGraphTest | , |
| GetNodeAttribute | |||
| ) |
Definition at line 270 of file tpl_matgraph_test.cc.
| TEST_F | ( | MatrixGraphTest | , |
| ModifyEntry | |||
| ) |
Definition at line 320 of file tpl_matgraph_test.cc.
| TEST_F | ( | MatrixGraphTest | , |
| NoArcReturnsNull | |||
| ) |
Definition at line 306 of file tpl_matgraph_test.cc.