
extract_cover - driver script to illustrate extract_cover method in Set::IntSpan::Island

Just run it.

Using extract_covers to simulate a random coverage process.
Given an integer range 0-$range, I create randomly placed islands of size $island_size on the range. These islands are stored in the hash $set_hash, each indexed by a counter.
....................................................->
----- 1 ----- 15 ----- 31 ------ 7
----- 2 ----- 25 ------ 8
----- 13 ----- 3 ------ 9 ----- 4
----- 6
There's enough islands to cover the range $fold_coverage times. The islands are exhaustively intersected using extract_covers to produce the covers shown below. Each cover is annotated with the indexes of the islands that intersect it.
3 31
___-----__----_-___--___--__---_-_____---_--___---__
1 13 15 15 2 2 6 25 31 31 9 7 7 7 8
3 3 6 25 9 4 4
8

Martin Krzywinski <martink@bcgsc.ca>