Sync from upstream.

This commit is contained in:
Rene Rivera 2025-05-01 21:44:03 -05:00
commit 7b9640389c
2 changed files with 8 additions and 3 deletions

View File

@ -22,6 +22,8 @@ path-constant CYCLE_RATIO_INPUT_FILE : ./cycle_ratio_s382.90.dot ;
path-constant METIS_INPUT_FILE : ./weighted_graph.gr ;
path-constant WEIGHTED_MATCHING_INPUT_FILE : ./weighted_matching.dat ;
project : requirements <library>/boost/graph//boost_graph ;
alias graph_test_regular :
@ -118,7 +120,7 @@ alias graph_test_regular :
[ run cuthill_mckee_ordering.cpp ]
[ run king_ordering.cpp ]
[ run matching_test.cpp ]
[ run weighted_matching_test.cpp ]
[ run weighted_matching_test.cpp : $(WEIGHTED_MATCHING_INPUT_FILE) ]
[ run weighted_matching_test2.cpp ]
[ run max_flow_test.cpp ]
[ run boykov_kolmogorov_max_flow_test.cpp ]

View File

@ -136,9 +136,12 @@ Graph make_graph(typename graph_traits< Graph >::vertices_size_type num_v,
return g;
}
int main(int, char*[])
int main(int argc, char* argv[])
{
std::ifstream in_file("weighted_matching.dat");
const char* filename = "weighted_matching.dat";
if (argc > 1)
filename = argv[1];
std::ifstream in_file(filename);
BOOST_TEST(in_file.good());
std::string line;
while (std::getline(in_file, line))