Changeset 462:0ab31578af67 in lemon0.x for src/work/johanna/unionfind_test.cc
 Timestamp:
 04/28/04 22:55:18 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@613
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/johanna/unionfind_test.cc
r394 r462 76 76 cout << "size of the class of 6: " << U.size(6) << endl; 77 77 check(U.size(6) == 1); 78 cout << "size of the class of 2: " << U.size(2) << endl; 79 check(U.size(2) == 3); 78 80 79 81 cout <<"erase 1: " << endl; 80 82 U.erase(1); 81 83 print(U); 84 85 cout << "size of the class of 4: " << U.size(4) << endl; 86 check(U.size(4) == 2); 87 cout << "size of the class of 2: " << U.size(2) << endl; 88 check(U.size(2) == 2); 89 82 90 83 91 cout <<"erase 1: " << endl; … … 93 101 print(U); 94 102 103 104 cout << "size of the class of 4: " << U.size(4) << endl; 105 check(U.size(4) == 2); 106 cout << "size of the class of 3: " << U.size(3) << endl; 107 check(U.size(3) == 1); 108 cout << "size of the class of 2: " << U.size(2) << endl; 109 check(U.size(2) == 2); 110 111 95 112 cout << "Joining 3  4 and 2  4 ..." << endl; 96 113 check(U.join(3,4)); 97 114 check(!U.join(2,4)); 98 115 print(U); 116 117 118 cout << "size of the class of 4: " << U.size(4) << endl; 119 check(U.size(4) == 3); 120 cout << "size of the class of 3: " << U.size(3) << endl; 121 check(U.size(3) == 3); 122 cout << "size of the class of 2: " << U.size(2) << endl; 123 check(U.size(2) == 3); 124 125 cout << "makeRep(4)" << endl; 126 U.makeRep(4); 127 print(U); 128 cout << "makeRep(3)" << endl; 129 U.makeRep(3); 130 print(U); 131 cout << "makeRep(2)" << endl; 132 U.makeRep(2); 133 print(U); 134 135 cout << "size of the class of 4: " << U.size(4) << endl; 136 check(U.size(4) == 3); 137 cout << "size of the class of 3: " << U.size(3) << endl; 138 check(U.size(3) == 3); 139 cout << "size of the class of 2: " << U.size(2) << endl; 140 check(U.size(2) == 3); 141 99 142 100 143 cout << "eraseClass 4 ..." << endl;
Note: See TracChangeset
for help on using the changeset viewer.