14namespace sequoia::testing
16 namespace undirected_graph{
20 nodew = graph_description::end,
68 node_1w_1w_node_0w_0w,
72 node_1_1w_1x_node_0_0w_0x,
78 node_0y_1_1w_1x_node_0_0w_0x,
86 class EdgeStorageConfig,
87 class NodeWeightStorage
93 using edge_t =
typename graph_t::edge_init_type;
94 using node_weight_type =
typename graph_t::node_weight_type;
95 using edges_equivalent_t = std::initializer_list<std::initializer_list<edge_t>>;
98 constexpr static bool has_shared_weight{EdgeStorageConfig::edge_sharing == maths::edge_sharing_preference::shared_weight};
102 auto trg{make_weighted_transition_graph(t)};
105 [&t](std::string_view description,
const graph_t& obtained,
const graph_t& prediction,
const graph_t& parent, std::size_t host, std::size_t target) {
106 t.check(equality, {description, no_source_location}, obtained, prediction);
107 if(host != target) t.check_semantics({description, no_source_location}, prediction, parent);
115 static graph_t make_and_check(
regular_test& t, std::string_view description, edges_equivalent_t edgeInit, std::initializer_list<node_weight_type> nodeInit)
120 static void check_initialization_exceptions(
regular_test& t)
122 using nodes = std::initializer_list<node_weight_type>;
125 t.check_exception_thrown<std::logic_error>(
"Mismatched loop weights", [](){
return graph_t{{edge_t{0, 1.0}, edge_t{0, 2.0}}}; });
128 t.check_exception_thrown<std::logic_error>(
"Mismatched weights", [](){
return graph_t{{edge_t{1, 1.0}}, {edge_t{0, 2.0}}}; });
130 t.check_exception_thrown<std::logic_error>(
"Mismatched edge/node initialization", [](){
return graph_t{{}, nodes{1.0}}; });
131 t.check_exception_thrown<std::logic_error>(
"Mismatched edge/node initialization", [](){
return graph_t{{{}}, nodes{1.0, 2.0}}; });
132 t.check_exception_thrown<std::logic_error>(
"Mismatched edge/node initialization", [](){
return graph_t{{{edge_t{0, 1.0}, edge_t{0, 1.0}}}, nodes{1.0, 2.0}}; });
133 t.check_exception_thrown<std::logic_error>(
"Mismatched edge/node initialization", [](){
return graph_t{{{}, {}}, nodes{1.0}}; });
134 t.check_exception_thrown<std::logic_error>(
"Mismatched edge/node initialization", [](){
return graph_t{{{edge_t{1}}, {edge_t{0}}}, nodes{1.0}}; });
138 static transition_graph make_weighted_transition_graph(
regular_test& t)
143 auto trg{base_ops::make_transition_graph(t)};
145 check_initialization_exceptions(t);
148 trg.add_node(make_and_check(t, t.report(
""), {{}}, {1.0}));
151 trg.add_node(make_and_check(t, t.report(
""), {{{0, 0.0}, {0, 0.0}}}, {1.0}));
154 trg.add_node(make_and_check(t, t.report(
""), {{{0, 1.0}, {0, 1.0}}}, {0.0}));
157 trg.add_node(make_and_check(t, t.report(
""), {{{0, 1.0}, {0, 1.0}, {0, 1.0}, {0, 1.0}}}, {0.0}));
162 auto g{make_and_check(t, t.report(
""), {{{0, 0.0}, {0, 0.0}, {0, 1.0}, {0, 1.0}}}, {0.0})};
163 t.check(equality,
"Canonical ordering of weighted edges", graph_t{{{{0, 1.0}, {0, 0.0}, {0, 1.0}, {0, 0.0}}}, {0.0}}, g);
168 trg.add_node(make_and_check(t, t.report(
""), {{}, {}}, {0.0, 1.0}));
171 trg.add_node(make_and_check(t, t.report(
""), {{}, {}}, {1.0, 0.0}));
174 trg.add_node(make_and_check(t, t.report(
""), {{{1, 0.0}}, {{0, 0.0}}}, {0.0, 1.0}));
177 trg.add_node(make_and_check(t, t.report(
""), {{{1, 0.0}}, {{0, 0.0}}}, {1.0, 0.0}));
180 trg.add_node(make_and_check(t, t.report(
""), {{{0, 1.0}, {0, 1.0}, {1, 0.0}}, {{0, 0.0}}}, {0.0, 0.0})),
183 trg.add_node(make_and_check(t, t.report(
""), {{{1, 0.0}}, {{0, 0.0}, {1, 1.0}, {1, 1.0}}}, {0.0, 0.0})),
188 auto g{make_and_check(t, t.report(
""), {{{1, 0.0}, {1, 1.0}}, {{0, 0.0}, {0, 1.0}}}, {0.0, 0.0})};
189 t.check(equality,
"Canonical ordering of weighted edges", graph_t{{{{1, 1.0}, {1, 0.0}}, {{0, 0.0}, {0, 1.0}}}, {0.0, 0.0}}, g);
190 t.check(equality,
"Canonical ordering of weighted edges", graph_t{{{{1, 1.0}, {1, 0.0}}, {{0, 1.0}, {0, 0.0}}}, {0.0, 0.0}}, g);
196 trg.add_node(make_and_check(t, t.report(
""), {{{1, 1.0}, {1, 1.0}}, {{0, 1.0}, {0, 1.0}}}, {0.0, 0.0}));
201 auto g{make_and_check(t, t.report(
""), {{{1, 0.0}, {1, 1.0}, {1, 2.0}}, {{0, 0.0}, {0, 1.0}, {0, 2.0}}}, {0.0, 0.0})};
202 t.check(equality,
"Canonical ordering of weighted edges", graph_t{{{{1, 2.0}, {1, 0.0}, {1, 1.0}}, {{0, 1.0}, {0, 2.0}, {0, 0.0}}}, {0.0, 0.0}}, g);
208 trg.add_node(make_and_check(t, t.report(
""), {{{0, 3.0}, {0, 3.0}, {1, 0.0}, {1, 1.0}, {1, 2.0}}, {{0, 0.0}, {0, 1.0}, {0, 2.0}}}, {0.0, 0.0}));
213 graph_description::empty,
214 graph_description::empty,
216 [&t](graph_t g) -> graph_t {
217 t.check_exception_thrown<std::out_of_range>(
"Attempt to set a node weight which does not exist", [&g](){ g.set_node_weight(g.cbegin_node_weights(), 1.0); });
223 graph_description::empty,
224 graph_description::empty,
225 t.report(
"Attempt to mutate a node weight which does not exist"),
226 [&t](graph_t g) -> graph_t {
227 t.check_exception_thrown<std::out_of_range>(
"Attempt to mutate a node weight which does not exist", [&g](){ g.mutate_node_weight(g.cbegin_node_weights(), [](
double&){}); });
233 graph_description::empty,
234 weighted_graph_description::nodew,
235 t.report(
"Add weighted node"),
236 [](graph_t g) -> graph_t {
243 graph_description::empty,
244 weighted_graph_description::nodew,
245 t.report(
"Insert weighted node"),
246 [](graph_t g) -> graph_t {
247 g.insert_node(0, 1.0);
257 graph_description::node,
258 graph_description::node,
260 [&t](graph_t g) -> graph_t {
261 t.check_exception_thrown<std::out_of_range>(
"Attempt to set a node weight which does not exist", [&g](){ g.set_node_weight(g.cend_node_weights(), 1.0); });
267 graph_description::node,
268 graph_description::node,
269 t.report(
"Attempt to mutate a node weight which does not exist"),
270 [&t](graph_t g) -> graph_t {
271 t.check_exception_thrown<std::out_of_range>(
"Attempt to mutate a node weight which does not exist", [&g](){ g.mutate_node_weight(g.cend_node_weights(), [](
double&){}); });
277 graph_description::node,
278 weighted_graph_description::nodew,
279 t.report(
"Change node weight"),
280 [](graph_t g) -> graph_t {
281 g.set_node_weight(g.cbegin_node_weights(), 1.0);
287 graph_description::node,
288 weighted_graph_description::nodew,
289 t.report(
"Mutate node weight"),
290 [](graph_t g) -> graph_t {
291 g.mutate_node_weight(g.cbegin_node_weights(), [](
double& x) { x += 1.0; });
297 graph_description::node,
298 weighted_graph_description::nodew_node,
299 t.report(
"Insert weighted node"),
300 [](graph_t g) -> graph_t {
301 g.insert_node(0, 1.0);
311 graph_description::node_0,
312 weighted_graph_description::node_0w,
313 t.report(
"Set edge weight"),
314 [](graph_t g) -> graph_t {
315 g.set_edge_weight(g.cbegin_edges(0), 1.0);
321 graph_description::node_0,
322 weighted_graph_description::node_0w,
323 t.report(
"Set edge weight via second insertion"),
324 [](graph_t g) -> graph_t {
325 g.set_edge_weight(++g.cbegin_edges(0), 1.0);
331 graph_description::node_0,
332 weighted_graph_description::node_0w,
333 t.report(
"Mutate edge weight"),
334 [](graph_t g) -> graph_t {
335 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x){ x += 1.0; });
341 graph_description::node_0,
342 weighted_graph_description::node_0w,
343 t.report(
"Mutate edge weight via second insertion"),
344 [](graph_t g) -> graph_t {
345 g.mutate_edge_weight(++g.cbegin_edges(0), [](
double& x){ x += 1.0; });
351 graph_description::node_0,
352 weighted_graph_description::node_0_0w,
353 t.report(
"Join {0,0}"),
354 [](graph_t g) -> graph_t {
365 graph_description::node_0_0,
366 weighted_graph_description::node_0_0w,
367 t.report(
"Set edge weight via zeroth partial weight"),
368 [](graph_t g) -> graph_t {
369 g.set_edge_weight(g.cbegin_edges(0), 1.0);
370 g.swap_edges(0, 0, 2);
371 g.swap_edges(0, 1, 3);
377 graph_description::node_0_0,
378 weighted_graph_description::node_0_0w,
379 t.report(
"Set edge weight via first partial weight"),
380 [](graph_t g) -> graph_t {
381 g.set_edge_weight(g.cbegin_edges(0) + 1, 1.0);
382 g.swap_edges(0, 0, 2);
383 g.swap_edges(0, 1, 3);
389 graph_description::node_0_0,
390 weighted_graph_description::node_0_0w,
391 t.report(
"Set edge weight via second partial weight"),
392 [](graph_t g) -> graph_t {
393 g.set_edge_weight(g.cbegin_edges(0) + 2, 1.0);
394 if constexpr(!has_shared_weight)
395 g.swap_edges(0, 0, 3);
402 graph_description::node_0_0,
403 weighted_graph_description::node_0_0w,
404 t.report(
"Set edge weight via third partial weight"),
405 [](graph_t g) -> graph_t {
406 g.set_edge_weight(g.cbegin_edges(0) + 3, 1.0);
407 if constexpr(!has_shared_weight)
408 g.swap_edges(0, 0, 2);
415 graph_description::node_0_0,
416 weighted_graph_description::node_0_0w,
417 t.report(
"Mutate edge weight via zeroth partial weight"),
418 [](graph_t g) -> graph_t {
419 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x) { x += 1.0; });
420 g.swap_edges(0, 0, 2);
421 g.swap_edges(0, 1, 3);
427 graph_description::node_0_0,
428 weighted_graph_description::node_0_0w,
429 t.report(
"Mutate edge weight via first partial weight"),
430 [](graph_t g) -> graph_t {
431 g.mutate_edge_weight(g.cbegin_edges(0)+1, [](
double& x) { x += 1.0; });
432 g.swap_edges(0, 0, 2);
433 g.swap_edges(0, 1, 3);
439 graph_description::node_0_0,
440 weighted_graph_description::node_0_0w,
441 t.report(
"Mutate edge weight via second partial weight"),
442 [](graph_t g) -> graph_t {
443 g.mutate_edge_weight(g.cbegin_edges(0)+2, [](
double& x) { x += 1.0; });
444 if constexpr(!has_shared_weight)
445 g.swap_edges(0, 0, 3);
452 graph_description::node_0_0,
453 weighted_graph_description::node_0_0w,
454 t.report(
"Mutate edge weight via third partial weight"),
455 [](graph_t g) -> graph_t {
456 g.mutate_edge_weight(g.cbegin_edges(0)+3, [](
double& x) { x += 1.0; });
457 if constexpr(!has_shared_weight)
458 g.swap_edges(0, 0, 2);
469 graph_description::node_0_1_node_0,
470 weighted_graph_description::node_0w_1_node_0,
471 t.report(
"Set loop weight via zeroth partial weight"),
472 [](graph_t g) -> graph_t {
473 g.set_edge_weight(g.cbegin_edges(0), 1.0);
479 graph_description::node_0_1_node_0,
480 weighted_graph_description::node_0w_1_node_0,
481 t.report(
"Set loop weight via first partial weight"),
482 [](graph_t g) -> graph_t {
483 g.set_edge_weight(++g.cbegin_edges(0), 1.0);
489 graph_description::node_0_1_node_0,
490 weighted_graph_description::node_0w_1_node_0,
491 t.report(
"Mutate loop weight via zeroth partial weight"),
492 [](graph_t g) -> graph_t {
493 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x) { x += 1.0; });
499 graph_description::node_0_1_node_0,
500 weighted_graph_description::node_0w_1_node_0,
501 t.report(
"Mutate loop weight via first partial weight"),
502 [](graph_t g) -> graph_t {
503 g.mutate_edge_weight(++g.cbegin_edges(0), [](
double& x) { x += 1.0; });
513 graph_description::node_1_node_0_1,
514 weighted_graph_description::node_1_node_0_1w,
515 t.report(
"Set loop weight via zeroth partial weight"),
516 [](graph_t g) -> graph_t {
517 g.set_edge_weight(g.cbegin_edges(1)+1, 1.0);
523 graph_description::node_1_node_0_1,
524 weighted_graph_description::node_1_node_0_1w,
525 t.report(
"Set loop weight via first partial weight"),
526 [](graph_t g) -> graph_t {
527 g.set_edge_weight(g.cbegin_edges(1)+2, 1.0);
533 graph_description::node_1_node_0_1,
534 weighted_graph_description::node_1_node_0_1w,
535 t.report(
"Mutate loop weight via zeroth partial weight"),
536 [](graph_t g) -> graph_t {
537 g.mutate_edge_weight(g.cbegin_edges(1)+1, [](
double& x) { x += 1.0; });
543 graph_description::node_1_node_0_1,
544 weighted_graph_description::node_1_node_0_1w,
545 t.report(
"Mutate loop weight via first partial weight"),
546 [](graph_t g) -> graph_t {
547 g.mutate_edge_weight(g.cbegin_edges(1)+2, [](
double& x) { x += 1.0; });
557 graph_description::node_1_1_node_0_0,
558 weighted_graph_description::node_1_1w_node_0_0w,
559 t.report(
"Set edge weight via node 0, zeroth partial edge"),
560 [](graph_t g) -> graph_t {
561 g.set_edge_weight(g.cbegin_edges(0), 1.0);
562 g.swap_edges(0, 0, 1);
563 g.swap_edges(1, 0, 1);
569 graph_description::node_1_1_node_0_0,
570 weighted_graph_description::node_1_1w_node_0_0w,
571 t.report(
"Set edge weight via node 0, first partial edge"),
572 [](graph_t g) -> graph_t {
573 g.set_edge_weight(++g.cbegin_edges(0), 1.0);
574 if constexpr(!has_shared_weight)
575 g.swap_edges(1, 0, 1);
582 graph_description::node_1_1_node_0_0,
583 weighted_graph_description::node_1_1w_node_0_0w,
584 t.report(
"Set edge weight via node 1, zeroth partial edge"),
585 [](graph_t g) -> graph_t {
586 g.set_edge_weight(g.cbegin_edges(1), 1.0);
587 g.swap_edges(0, 0, 1);
588 g.swap_edges(1, 0, 1);
594 graph_description::node_1_1_node_0_0,
595 weighted_graph_description::node_1_1w_node_0_0w,
596 t.report(
"Set edge weight via node 1, first partial edge"),
597 [](graph_t g) -> graph_t {
598 g.set_edge_weight(++g.cbegin_edges(1), 1.0);
599 if constexpr(!has_shared_weight)
600 g.swap_edges(0, 0, 1);
607 graph_description::node_1_1_node_0_0,
608 weighted_graph_description::node_1_1w_node_0_0w,
609 t.report(
"Mutate edge weight via node 0, zeroth partial edge"),
610 [](graph_t g) -> graph_t {
611 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x) { x += 1.0; });
612 g.swap_edges(0, 0, 1);
613 g.swap_edges(1, 0, 1);
619 graph_description::node_1_1_node_0_0,
620 weighted_graph_description::node_1_1w_node_0_0w,
621 t.report(
"Mutate edge weight via node 0, first partial edge"),
622 [](graph_t g) -> graph_t {
623 g.mutate_edge_weight(++g.cbegin_edges(0), [](
double& x) { x += 1.0; });
624 if constexpr(!has_shared_weight)
625 g.swap_edges(1, 0, 1);
632 graph_description::node_1_1_node_0_0,
633 weighted_graph_description::node_1_1w_node_0_0w,
634 t.report(
"Mutate edge weight via node 1, zeroth partial edge"),
635 [](graph_t g) -> graph_t {
636 g.mutate_edge_weight(g.cbegin_edges(1), [](
double& x) { x += 1.0; });
637 g.swap_edges(0, 0, 1);
638 g.swap_edges(1, 0, 1);
644 graph_description::node_1_1_node_0_0,
645 weighted_graph_description::node_1_1w_node_0_0w,
646 t.report(
"Mutate edge weight via node 1, first partial edge"),
647 [](graph_t g) -> graph_t {
648 g.mutate_edge_weight(++g.cbegin_edges(1), [](
double& x) { x += 1.0; });
649 if constexpr(!has_shared_weight)
650 g.swap_edges(0, 0, 1);
663 weighted_graph_description::node_0_0w,
664 weighted_graph_description::node_0w,
665 t.report(
"Remove zeroth partial edge"),
666 [](graph_t g) -> graph_t {
667 g.erase_edge(g.cbegin_edges(0));
673 weighted_graph_description::node_0_0w,
674 weighted_graph_description::node_0w,
675 t.report(
"Remove first partial edge"),
676 [](graph_t g) -> graph_t {
677 g.erase_edge(++g.cbegin_edges(0));
687 weighted_graph_description::node_0w_0w,
688 graph_description::node_0,
689 t.report(
"Ensure edge erasure treats shared weights properly"),
690 [](graph_t g) -> graph_t {
691 g.swap_edges(0, 1, 2);
692 g.erase_edge(g.cbegin_edges(0));
693 g.set_edge_weight(g.cbegin_edges(0), 0.0);
699 weighted_graph_description::node_0w_0w,
700 graph_description::node_0,
701 t.report(
"Ensure edge erasure treats shared weights properly"),
702 [](graph_t g) -> graph_t {
703 g.erase_edge(g.cbegin_edges(0)+2);
704 g.set_edge_weight(g.cbegin_edges(0), 0.0);
710 weighted_graph_description::node_0w_0w,
711 graph_description::node_0,
712 t.report(
"Ensure edge erasure treats shared weights properly"),
713 [](graph_t g) -> graph_t {
714 g.erase_edge(g.cbegin_edges(0) + 3);
715 g.set_edge_weight(g.cbegin_edges(0), 0.0);
725 weighted_graph_description::node_nodew,
726 weighted_graph_description::nodew_node,
727 t.report(
"Swap nodes"),
728 [](graph_t g) -> graph_t {
739 weighted_graph_description::nodew_node,
740 weighted_graph_description::node_nodew,
741 t.report(
"Swap nodes"),
742 [](graph_t g) -> graph_t {
753 weighted_graph_description::node_1_nodew_0,
754 weighted_graph_description::nodew_1_node_0,
755 t.report(
"Swap nodes"),
756 [](graph_t g) -> graph_t {
767 weighted_graph_description::nodew_1_node_0,
768 weighted_graph_description::node_1_nodew_0,
769 t.report(
"Swap nodes"),
770 [](graph_t g) -> graph_t {
781 weighted_graph_description::node_1_1w_node_0_0w,
782 weighted_graph_description::node_1w_1w_node_0w_0w,
783 t.report(
"Set edge weight {0, 1}"),
784 [](graph_t g) -> graph_t {
785 g.set_edge_weight(g.cbegin_edges(0), 1.0);
791 weighted_graph_description::node_1_1w_node_0_0w,
792 weighted_graph_description::node_1w_1w_node_0w_0w,
793 t.report(
"Set edge weight {1, 0}"),
794 [](graph_t g) -> graph_t {
795 g.set_edge_weight(g.cbegin_edges(1), 1.0);
805 weighted_graph_description::node_1w_1w_node_0w_0w,
806 weighted_graph_description::node_1_1w_node_0_0w,
807 t.report(
"Set edge weight {0, 1}"),
808 [](graph_t g) -> graph_t {
809 g.set_edge_weight(g.cbegin_edges(0), 0.0);
815 weighted_graph_description::node_1w_1w_node_0w_0w,
816 weighted_graph_description::node_1_1w_node_0_0w,
817 t.report(
"Set edge weight {1, 0}"),
818 [](graph_t g) -> graph_t {
819 g.set_edge_weight(g.cbegin_edges(1), 0.0);
825 weighted_graph_description::node_1w_1w_node_0w_0w,
826 weighted_graph_description::node_1_1w_node_0_0w,
827 t.report(
"Mutate edge weight {0, 1}"),
828 [](graph_t g) -> graph_t {
829 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x){ x -= 1.0; });
835 weighted_graph_description::node_1w_1w_node_0w_0w,
836 weighted_graph_description::node_1_1w_node_0_0w,
837 t.report(
"Mutate edge weight {1, 0}"),
838 [](graph_t g) -> graph_t {
839 g.mutate_edge_weight(g.cbegin_edges(1), [](
double& x){ x -= 1.0; });
845 weighted_graph_description::node_1w_1w_node_0w_0w,
846 graph_description::node_1_node_0,
847 t.report(
"Ensure edge erasure treats shared weights properly"),
848 [](graph_t g) -> graph_t {
849 g.swap_edges(1, 0, 1);
850 g.erase_edge(g.cbegin_edges(0));
851 g.set_edge_weight(g.cbegin_edges(0), 0.0);
861 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
862 weighted_graph_description::node_0y_1_1w_1x_node_0_0w_0x,
863 t.report(
"Join {0,0} and sort"),
864 [](graph_t g) -> graph_t {
866 g.sort_edges(g.cbegin_edges(0),
868 [](
const auto& lhs,
const auto& rhs) {
869 return (lhs.target_node() == rhs.target_node()) ? lhs.weight() < rhs.weight() : (lhs.target_node() < rhs.target_node());
876 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
877 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
878 t.report(
"Set multiple edge weights and sort"),
879 [](graph_t g) -> graph_t {
880 g.set_edge_weight(g.cbegin_edges(0), 1.0);
881 g.set_edge_weight(g.cbegin_edges(0) + 1, 2.0);
882 g.set_edge_weight(g.cbegin_edges(0) + 2 , 0.0);
884 for(
auto i : std::views::iota(0uz, 2uz))
885 g.sort_edges(g.cbegin_edges(i), g.cend_edges(i), [](
const auto& lhs,
const auto& rhs) {
return lhs.weight() < rhs.weight(); });
892 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
893 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
894 t.report(
"Mutate mutliple edge weights and sort"),
895 [](graph_t g) -> graph_t {
896 g.mutate_edge_weight(g.cbegin_edges(0), [](
double& x){ x += 1.0; });
897 g.mutate_edge_weight(g.cbegin_edges(0) + 1, [](
double& x){ x += 1.0; });
898 g.mutate_edge_weight(g.cbegin_edges(0) + 2, [](
double& x){ x -= 2.0; });
900 for(
auto i : std::views::iota(0uz, 2uz))
901 g.sort_edges(g.cbegin_edges(i), g.cend_edges(i), [](
const auto& lhs,
const auto& rhs) {
return lhs.weight() < rhs.weight(); });
912 weighted_graph_description::node_0y_1_1w_1x_node_0_0w_0x,
913 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
914 t.report(
"Remove zeroth partial edge"),
915 [](graph_t g) -> graph_t {
916 g.erase_edge(g.cbegin_edges(0));
922 weighted_graph_description::node_0y_1_1w_1x_node_0_0w_0x,
923 weighted_graph_description::node_1_1w_1x_node_0_0w_0x,
924 t.report(
"Remove first partial edge"),
925 [](graph_t g) -> graph_t {
926 g.erase_edge(++g.cbegin_edges(0));
weighted_graph_description
Convention: the indices following 'node' - separated by underscores - give the target node of the ass...
Definition: DynamicUndirectedGraphWeightedTestingUtilities.hpp:18
Definition: DynamicGraph.hpp:303
Definition: DynamicGraph.hpp:360
class template from which all concrete tests should derive.
Definition: FreeTestCore.hpp:144
Exposes elementary check methods, with the option to plug in arbitrary Extenders to compose functiona...
Definition: FreeCheckers.hpp:708
Definition: DynamicUndirectedGraphTestingUtilities.hpp:138
Definition: DynamicUndirectedGraphWeightedTestingUtilities.hpp:90
Definition: DynamicGraphTestingUtilities.hpp:173
Definition: StateTransitionUtilities.hpp:77