MCPcopy Create free account
hub / github.com/davisking/dlib / test_graph_cuts

Function test_graph_cuts

dlib/test/graph_cuts.cpp:800–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798
799 template <typename min_cut, typename edge_weight_type>
800 void test_graph_cuts(dlib::rand& rnd)
801 {
802 typedef typename dlib::directed_graph<node_label, edge_weight_type>::kernel_1a_c dgraph_type;
803 // we will create two identical graphs.
804 dgraph_type g1, g2;
805 min_cut mc;
806
807 unsigned long source, sink;
808
809 dlib::rand rnd_copy(rnd);
810 make_random_graph(rnd,g1, source, sink);
811 make_random_graph(rnd_copy,g2, source, sink);
812 run_test_on_graphs(mc, g1, g2, source, sink);
813
814 rnd_copy = rnd;
815 make_random_grid_graph(rnd,g1, source, sink);
816 make_random_grid_graph(rnd_copy,g2, source, sink);
817 run_test_on_graphs(mc, g1, g2, source, sink);
818
819 rnd_copy = rnd;
820 make_random_chain_graph(rnd,g1, source, sink);
821 make_random_chain_graph(rnd_copy,g2, source, sink);
822 run_test_on_graphs(mc, g1, g2, source, sink);
823
824 }
825
826// ----------------------------------------------------------------------------------------
827

Callers

nothing calls this directly

Calls 4

make_random_graphFunction · 0.85
run_test_on_graphsFunction · 0.85
make_random_grid_graphFunction · 0.85
make_random_chain_graphFunction · 0.85

Tested by

no test coverage detected