Changeset 1203:8c567e298d7f in lemon-main for test
- Timestamp:
- 10/27/18 13:00:48 (6 years ago)
- Branch:
- default
- Children:
- 1204:736a341e604b, 1205:57abff252556, 1208:c6aa2cc1af04
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/matching_test.cc
r1092 r1203 135 135 mat_test.startDense(); 136 136 mat_test.run(); 137 mat_test.startSparse(false); 138 mat_test.startDense(false); 139 mat_test.run(false); 137 140 138 141 const_mat_test.matchingSize(); … … 403 406 edgeMap("weight", weight).run(); 404 407 408 int size; 405 409 bool perfect; 406 410 { … … 408 412 mm.run(); 409 413 checkMatching(graph, mm); 414 size = mm.matchingSize(); 410 415 perfect = 2 * mm.matchingSize() == countNodes(graph); 416 } 417 418 { 419 MaxMatching<SmartGraph> mm(graph); 420 mm.init(); 421 mm.startSparse(); 422 checkMatching(graph, mm); 423 check(size == mm.matchingSize(), "Inconsistent matching size"); 424 } 425 426 { 427 MaxMatching<SmartGraph> mm(graph); 428 mm.init(); 429 mm.startDense(); 430 checkMatching(graph, mm); 431 check(size == mm.matchingSize(), "Inconsistent matching size"); 432 } 433 434 { 435 MaxMatching<SmartGraph> mm(graph); 436 mm.greedyInit(); 437 mm.startSparse(); 438 checkMatching(graph, mm); 439 check(size == mm.matchingSize(), "Inconsistent matching size"); 440 } 441 442 { 443 MaxMatching<SmartGraph> mm(graph); 444 mm.greedyInit(); 445 mm.startDense(); 446 checkMatching(graph, mm); 447 check(size == mm.matchingSize(), "Inconsistent matching size"); 448 } 449 450 { 451 MaxMatching<SmartGraph> mm(graph); 452 mm.run(false); 453 check(size == mm.matchingSize(), "Inconsistent max cardinality matching"); 454 } 455 456 { 457 MaxMatching<SmartGraph> mm(graph); 458 mm.init(); 459 mm.startSparse(false); 460 check(size == mm.matchingSize(), "Inconsistent matching size"); 461 } 462 463 { 464 MaxMatching<SmartGraph> mm(graph); 465 mm.init(); 466 mm.startDense(false); 467 check(size == mm.matchingSize(), "Inconsistent matching size"); 468 } 469 470 { 471 MaxMatching<SmartGraph> mm(graph); 472 mm.greedyInit(); 473 mm.startSparse(false); 474 check(size == mm.matchingSize(), "Inconsistent matching size"); 475 } 476 477 { 478 MaxMatching<SmartGraph> mm(graph); 479 mm.greedyInit(); 480 mm.startDense(false); 481 check(size == mm.matchingSize(), "Inconsistent matching size"); 411 482 } 412 483
Note: See TracChangeset
for help on using the changeset viewer.