/**	@file	dk3bf.h	Bit field and bit matrix operations.

You can set/reset and retrieve bits in a bit array or a bit matrix.
A square bit matrix can be expanded to find indirect leader/follower
relationships. If you have a directed graph with a path from node
i to node j, you can use dk3bm_set(bm, i, j, 1) to indicate this.
To see whether there is an indirect path from node m to node n
the expansion algorithm checks whether there is a direct connection from
m to n or if there is any node o with a known direct or indirect 
connection from m to o and a connection from o to n. The expansion
internally runs multiple passes. It stops if there is no new connection
found in a pass.

Two algorithms are available: a simple algorithm and a cache friendly
algorithm.
The simple algorithm performs better if either (a) the processor cache
is large enough so the entire bit matrix fits into the cache or
(b) there is no processor cache.
The cache friendly algorithm performs better if there is a processor
cache but the bit matrix is too large to be cached completely.

You can use the /bitmatrix/expand/cache-friendly preference
to specify an amount of memory in bytes to switch from simple
to cache friendly algorithm.

Alternatively you can use the /proc/cache/available preference
to specify the entire cache size and the /proc/cache/percent
preference to specify the rate (in percent) available to your program.

*/

