Hi, I'm trying to determine the name of the algorithm which will determine if a set of blocks listed as Xl,Yl-X2Y2 are part of a contiguous larger block.
I'm just really looking for the name of, so I can go pull it out the NAG library. Bob.
Hi, I'm trying to determine the name of the algorithm which will determine if a set of blocks listed as Xl,Yl-X2Y2 are part of a contiguous larger block.
I'm just really looking for the name of, so I can go pull it out the NAG library. Bob.
It sounds like you describe a packing problem solving algorithm.
Edit: 2d packing algorithms were linked to in the see also section.
I see 2 interpretations of your question: "given a collection of rectangles of coordinates X1, Y1, X2, Y2,:...
1) does the union of these rectangles form one unique shape" - i.e. one "island", as opposed to "separate islands",
2) do all these rectangles intersect (or even are included in) a given shape.
I can't tell which one it is, but this sounds related to the Set Cover problem (which is related to the packing problem mentioned by rsp through duality), and possibly the Hitting Set.
I finally found out from a friend that the sweep line algo can be used for this. Simple in hindsight. Here is a link. Sweep Line Algo