1 /* $NetBSD: warshall.c,v 1.7 2013/04/06 14:52:24 christos Exp $ */
3 /* Id: warshall.c,v 1.7 2010/06/06 22:48:51 tom Exp */
8 __RCSID("$NetBSD: warshall.c,v 1.7 2013/04/06 14:52:24 christos Exp $");
11 transitive_closure(unsigned *R
, int n
)
23 rowsize
= WORDSIZE(n
);
24 relend
= R
+ n
* rowsize
;
36 if (*ccol
& (unsigned)(1 << i
))
39 rend
= rowj
+ rowsize
;
51 if (++i
>= BITS_PER_WORD
)
62 reflexive_transitive_closure(unsigned *R
, int n
)
69 transitive_closure(R
, n
);
71 rowsize
= WORDSIZE(n
);
72 relend
= R
+ n
* rowsize
;
78 *rp
|= (unsigned)(1 << i
);
79 if (++i
>= BITS_PER_WORD
)