Jump to content

Rose tree

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Lambert Meertens (talk | contribs) at 17:57, 15 June 2015 (Not a data structure but the plant!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, a multi-way tree or rose tree is a tree data structure with a variable and unbounded number of branches per node.[1][better source needed] The name rose tree for this structure is prevalent in the functional programming community, e.g., in the context of the Bird–Meertens formalism.[2] It was coined by Lambert Meertens to evoke the similarly-named, and similarly-structured, common rhododendron.[3]

Definition

The following is a definition in Haskell:

data RoseTree a = RoseTree a [RoseTree a]

Sources

  1. ^ Haskell Wiki, accessed 26 January 2012
  2. ^ Malcolm, Grant (1990). "Data structures and program transformation". Science of Computer Programming. 14 (2): 255–279.
  3. ^ Skillicorn, David B. (1996). "Parallel implementation of tree skeletons" (PDF). J. Parallel and Distributed Computing. 39 (2): 115–125.