开发者

Name of a particular algorithm

I'm trying to determine the name of the algorithm which will deter开发者_开发问答mine 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.


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.


It sounds like you describe a packing problem solving algorithm.

Edit: 2d packing algorithms were linked to in the see also section.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜