Extra utility function.

[originally from svn r6780]
This commit is contained in:
Simon Tatham
2006-08-05 16:35:25 +00:00
parent 6837cc46cd
commit f05c25347d
2 changed files with 9 additions and 0 deletions

8
dsf.c
View File

@ -28,3 +28,11 @@ void dsf_merge(int *dsf, int v1, int v2)
v2 = dsf_canonify(dsf, v2);
dsf[v2] = v1;
}
void dsf_init(int *dsf, int len)
{
int i;
for (i = 0; i < len; i++)
dsf[i] = i;
}