开发者

How should I cluster items into an ordered collection that makes sense graphically?

I've got an an application wherein I wil开发者_StackOverflowl be provided with an unordered collection of items (objects that can basically be represented as rectangles) and need to put them into a larger rectangular shape (a cluster) based off of their physical location. There may be more than one cluster of items, and some items may be in a cluster by themselves.

Each item knows which item is to its right (if any) and which item is below it (if any). Thus the items could be placed in a Directed Graph and traversed.

How can I display all of the items graphically? If I put the items in a Graph, how should I traverse it?


This sounds like a good use case for the PR QuadTree: http://www.codeproject.com/KB/recipes/QuadTree.aspx


Well, the best solution I've come up with so far is to use the GraphSharp library, although I haven't yet figured out how to customize the look of the Vertices (items) in the graph.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜