21namespace sequoia::testing
29 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::independent};
36 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::independent};
43 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::shared_weight};
50 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::shared_weight};
56 constexpr bool embedded(
const maths::graph_flavour graphFlavour)
noexcept
58 using gf = maths::graph_flavour;
59 return graphFlavour == gf::undirected_embedded;
64 maths::graph_flavour GraphFlavour,
67 class EdgeStorageConfig,
68 class NodeWeightStorage
77 maths::graph_flavour GraphFlavour,
80 class EdgeStorageConfig,
81 class NodeWeightStorage
83 requires (GraphFlavour == maths::graph_flavour::undirected)
91 maths::graph_flavour GraphFlavour,
94 class EdgeStorageConfig,
95 class NodeWeightStorage
97 requires (GraphFlavour == maths::graph_flavour::undirected_embedded)
105 maths::graph_flavour GraphFlavour,
108 class EdgeStorageConfig,
109 class NodeWeightStorage
111 using graph_type_generator_t =
typename graph_type_generator<GraphFlavour, EdgeWeight, NodeWeight, EdgeStorageConfig, NodeWeightStorage>::graph_type;
113 template <
class EdgeWeight,
class NodeWeight, concrete_test Test>
122 using flavour = maths::graph_flavour;
124 run_tests<flavour::undirected>();
125 if constexpr(!minimal_graph_tests())
127 run_tests<flavour::undirected_embedded>();
128 run_tests<flavour::directed>();
132 template<
class EdgeStorageConfig,
class NodeWeightStorage>
135 using flavour = maths::graph_flavour;
136 creation_permutations<flavour::undirected, EdgeStorageConfig, NodeWeightStorage>();
137 if constexpr (!minimal_graph_tests())
139 creation_permutations<flavour::undirected_embedded, EdgeStorageConfig, NodeWeightStorage>();
140 creation_permutations<flavour::directed, EdgeStorageConfig, NodeWeightStorage>();
144 template<maths::graph_flavour GraphFlavour>
147 creation_permutations<GraphFlavour, maths::contiguous_edge_storage_config, maths::node_storage<NodeWeight>>();
148 creation_permutations<GraphFlavour, maths::bucketed_edge_storage_config, maths::node_storage<NodeWeight>>();
155 maths::graph_flavour GraphFlavour,
156 class EdgeStorageConfig,
157 class NodeWeightStorage
159 void creation_permutations()
161 m_Test.template execute_operations<
171 template<maths::network G>
174 using edge_type =
typename G::edge_init_type;
175 using node_weight_type =
typename G::node_weight_type;
179 static G make_and_check(Test& t, std::string_view description, std::initializer_list<std::initializer_list<edge_type>> init)
182 t.check(equivalence, description, g, init);
188 static G make_and_check(Test& t, std::string_view description, std::initializer_list<std::initializer_list<edge_type>> edgeInit, std::initializer_list<node_weight_type> nodeInit)
190 G g{edgeInit, nodeInit};
191 t.check(equivalence, description, g, std::pair{edgeInit, nodeInit});
Edge & Node storage traits, base class and final classes for dynamic graphs.
Central location for pre-processor options.
Storage for partitioned data such that data within each partition is contiguous.
Definition: PartitionedData.hpp:63
Definition: PartitionedData.hpp:991
Definition: DynamicGraph.hpp:303
Definition: DynamicGraph.hpp:473
Definition: DynamicGraph.hpp:360
Definition: DynamicGraphTestingUtilities.hpp:115
Definition: DynamicGraphTestingUtilities.hpp:173
Definition: DynamicGraphTestingUtilities.hpp:71
Definition: DynamicGraphTestingUtilities.hpp:33
Definition: DynamicGraphTestingUtilities.hpp:26
Definition: DynamicGraphTestingUtilities.hpp:47
Definition: DynamicGraphTestingUtilities.hpp:40