| 229 | } |
| 230 | |
| 231 | forceinline void |
| 232 | OfflineMin::makeset(void){ |
| 233 | for(int i = n; i--; ){ |
| 234 | OfflineMinItem& cur = sequence[i]; |
| 235 | cur.rank = 0; // initially each set is empty |
| 236 | cur.name = i; // it has its own name |
| 237 | cur.root = i; // it is the root node |
| 238 | cur.parent = i; // it is its own parent |
| 239 | cur.pred = i - 1; |
| 240 | cur.succ = i + 1; |
| 241 | cur.iset = -5; |
| 242 | } |
| 243 | // no need to zero vertices, as it is only used as scratch area |
| 244 | } |
| 245 | |
| 246 | forceinline int |
| 247 | OfflineMin::size(void){ |