Hi board,
I need to display a n-ary tree. Does anybody have an implementation or logic to position the various nodes?
The tree can be arbritrarily huge.
Currently the nodes are library - movieClips and added to the _root using attachMovieClip and the connectors/edges are done using lines. The tree is not being displayed as of yet its just adding to nodes at random positions and drawing a line between them. :( n-ary tree: Definition from Answers.com:: n-ary tree ( ′enərē ′trē ) ( mathematics ) A rooted tree in which each vertex has at most n. http://www.answers.com/topic/n-ary-treeHOME |
Help. Any other stratergy to display the tree could also be used but the nodes should be draggable more precisely a node can be dragged and dropped into another node.
Thanks.
Cruiser.
Hi,
You would get a better idea if you see http://www.touchgraph.com/PlanetWissen.html
That is a 2d model but the nodes are all around. I want to do the same thing but the child nodes are always below the parent node. The physics aren't necessary. Special Trees:: Second we will discuss how to represent and process N-ary trees, where each parent can store . There are many ways to implement an N-ary tree structure. http://www.cs.cmu.edu/~pattis/15-1XX/15-200/lectures/specialtrees/index.htmlHOME |
Thanks.
Hoi
I would like to help but i dunno what you what to achieve.
maybe you can show what you all ready have :)
randomleeway = 10
spaceing = 20
this._x = (Math.random()*randomleeway-randomleeway/2)+ParentNode._x; Common Lisp N-ARY Tree (home) The n-ary-tree package implements an :: The n-ary-tree package implements an automatically rebalancing B-tree which supports n >= 5 items in any mixture of types per node. http://pounceatron.dreamhosters.com/nary-tree/HOME | Data Structures and Algorithms: n-ary trees:: The height of a complete m-ary tree with n nodes is ceiling(logmn). n-ary trees (or n-way trees): Trees in which each node may have up to n children. http://docs.linux.cz/programming/algorithms/Algorithms-Morris/n_ary_trees.htmlHOME |
this._y = (Math.random()*randomleeway-randomleeway/2)+ParentNode._y+spaceing;
some thing like that?
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|