equal
deleted
inserted
replaced
340 if (mwfm.matching(n) != INVALID) { |
340 if (mwfm.matching(n) != INVALID) { |
341 check(mwfm.nodeValue(n) >= 0, "Invalid node value"); |
341 check(mwfm.nodeValue(n) >= 0, "Invalid node value"); |
342 check(indeg == 1, "Invalid matching"); |
342 check(indeg == 1, "Invalid matching"); |
343 pv += weight[mwfm.matching(n)]; |
343 pv += weight[mwfm.matching(n)]; |
344 SmartGraph::Node o = graph.target(mwfm.matching(n)); |
344 SmartGraph::Node o = graph.target(mwfm.matching(n)); |
345 ignore_unused_variable_warning(o); |
345 ::lemon::ignore_unused_variable_warning(o); |
346 } else { |
346 } else { |
347 check(mwfm.nodeValue(n) == 0, "Invalid matching"); |
347 check(mwfm.nodeValue(n) == 0, "Invalid matching"); |
348 check(indeg == 0, "Invalid matching"); |
348 check(indeg == 0, "Invalid matching"); |
349 } |
349 } |
350 } |
350 } |
405 } |
405 } |
406 check(mwpfm.matching(n) != INVALID, "Invalid perfect matching"); |
406 check(mwpfm.matching(n) != INVALID, "Invalid perfect matching"); |
407 check(indeg == 1, "Invalid perfect matching"); |
407 check(indeg == 1, "Invalid perfect matching"); |
408 pv += weight[mwpfm.matching(n)]; |
408 pv += weight[mwpfm.matching(n)]; |
409 SmartGraph::Node o = graph.target(mwpfm.matching(n)); |
409 SmartGraph::Node o = graph.target(mwpfm.matching(n)); |
410 ignore_unused_variable_warning(o); |
410 ::lemon::ignore_unused_variable_warning(o); |
411 } |
411 } |
412 |
412 |
413 for (SmartGraph::EdgeIt e(graph); e != INVALID; ++e) { |
413 for (SmartGraph::EdgeIt e(graph); e != INVALID; ++e) { |
414 check((e == mwpfm.matching(graph.u(e)) ? 1 : 0) + |
414 check((e == mwpfm.matching(graph.u(e)) ? 1 : 0) + |
415 (e == mwpfm.matching(graph.v(e)) ? 1 : 0) == |
415 (e == mwpfm.matching(graph.v(e)) ? 1 : 0) == |