|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
GoogleTest suite for Prim.H. More...
#include <gtest/gtest.h>#include <limits>#include <random>#include <set>#include <vector>#include <Prim.H>#include <Kruskal.H>#include <tpl_graph.H>#include <tpl_graph_utils.H>Go to the source code of this file.
Typedefs | |
| using | GT = List_Graph< Graph_Node< int >, Graph_Arc< int > > |
| using | Node = GT::Node |
| using | Arc = GT::Arc |
Functions | |
| TEST (PrimBasic, EmptyGraph) | |
| TEST (PrimBasic, SingleNode) | |
| TEST (PrimBasic, TwoNodesOneArc) | |
| TEST (PrimBasic, TriangleGraph) | |
| TEST (PrimBasic, SquareGraph) | |
| TEST (PrimVsKruskal, SameWeightOnSimpleGraph) | |
| TEST (PrimVsKruskal, RandomGraph) | |
| TEST (PrimEdgeCases, AllEqualWeights) | |
| TEST (PrimEdgeCases, LinearGraph) | |
| TEST (PrimEdgeCases, StarGraph) | |
| TEST (PrimStress, LargeGraph) | |
| TEST (PrimStress, DenseGraph) | |
| TEST (PrimMapping, NodesAreMapped) | |
| TEST (PrimTextbook, ClassicExample) | |
GoogleTest suite for Prim.H.
This file contains exhaustive tests to verify the correctness of Prim's minimum spanning tree algorithm implementation in Aleph-w.
Tests for Prim
Definition in file prim_test.cc.
Definition at line 30 of file prim_test.cc.
| using GT = List_Graph<Graph_Node<int>, Graph_Arc<int> > |
Definition at line 28 of file prim_test.cc.
Definition at line 29 of file prim_test.cc.
| TEST | ( | PrimBasic | , |
| EmptyGraph | |||
| ) |
Definition at line 90 of file prim_test.cc.
References Aleph::maps().
| TEST | ( | PrimBasic | , |
| SingleNode | |||
| ) |
Definition at line 101 of file prim_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::maps().
| TEST | ( | PrimBasic | , |
| SquareGraph | |||
| ) |
| TEST | ( | PrimBasic | , |
| TriangleGraph | |||
| ) |
| TEST | ( | PrimBasic | , |
| TwoNodesOneArc | |||
| ) |
| TEST | ( | PrimEdgeCases | , |
| AllEqualWeights | |||
| ) |
| TEST | ( | PrimEdgeCases | , |
| LinearGraph | |||
| ) |
| TEST | ( | PrimEdgeCases | , |
| StarGraph | |||
| ) |
| TEST | ( | PrimMapping | , |
| NodesAreMapped | |||
| ) |
Definition at line 406 of file prim_test.cc.
References GraphCommon< GT, Node, Arc >::get_node_it(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::maps().
| TEST | ( | PrimStress | , |
| DenseGraph | |||
| ) |
Definition at line 369 of file prim_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::maps(), N, nodes, and rng.
| TEST | ( | PrimStress | , |
| LargeGraph | |||
| ) |
Definition at line 328 of file prim_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::maps(), N, nodes, and rng.
| TEST | ( | PrimTextbook | , |
| ClassicExample | |||
| ) |
| TEST | ( | PrimVsKruskal | , |
| RandomGraph | |||
| ) |
Definition at line 211 of file prim_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::maps(), N, nodes, and rng.
| TEST | ( | PrimVsKruskal | , |
| SameWeightOnSimpleGraph | |||
| ) |
Definition at line 181 of file prim_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::maps().