1 /* $NetBSD: warshall.c,v 1.6 2011/09/10 21:29:04 christos Exp $ */
2 /* Id: warshall.c,v 1.7 2010/06/06 22:48:51 tom Exp */
7 __RCSID("$NetBSD: warshall.c,v 1.6 2011/09/10 21:29:04 christos Exp $");
10 transitive_closure(unsigned *R
, int n
)
22 rowsize
= WORDSIZE(n
);
23 relend
= R
+ n
* rowsize
;
35 if (*ccol
& (unsigned)(1 << i
))
38 rend
= rowj
+ rowsize
;
50 if (++i
>= BITS_PER_WORD
)
61 reflexive_transitive_closure(unsigned *R
, int n
)
68 transitive_closure(R
, n
);
70 rowsize
= WORDSIZE(n
);
71 relend
= R
+ n
* rowsize
;
77 *rp
|= (unsigned)(1 << i
);
78 if (++i
>= BITS_PER_WORD
)