- Finger tree
A finger tree is a
purely functional data structure used in efficiently implementing other functional data structures, such as strings. A finger tree givesamortized constant time access to the "fingers" of the tree, which are usually the ends; amortized O(1)cons , reversing, cdr, O(log n) append and split; and can be adapted to be indexed or ordered sequences,They have since been used in the Haskell core libraries (in the implementation of "Data.Sequence"), and an implementation in
O'Caml exists [ [http://alan.petitepomme.net/cwn/2007.10.30.html#5 Caml Weekly News ] ] which was derived from a proven-correctCoq specification [ [http://www.lri.fr/~sozeau/research/russell/fingertrees.en.html Matthieu Sozeau :: Dependent Finger Trees in Coq ] ] ; and a [http://dnovatchev.spaces.live.com/blog/cns!44B0A32C2CCF7488!582.entry C# implementation of finger trees] was published in 2008; the Yitext editor specializes finger trees to finger strings for efficient storage of buffer text. Finger trees can be implemented with or without [citation|last1=Kaplan|first1=H.|last2=Tarjan|first2=R. E.|authorlink2=Robert Tarjan|year=1995|contribution=Persistent lists with catenation via recursive slow-down|title=Proceedings of the Twenty-Seventh Annual ACM Symposium on the Theory of Computing|pages=93–102.]lazy evaluation , but laziness allows for simpler implementations.They were first published in 1977 by
Leonidas J. Guibas [citation|last1=Guibas|first1=L. J.|authorlink1=Leonidas J. Guibas|last2=McCreight|first2=E. M.|last3=Plass|first3=M. F.|last4=Roberts|first4=J. R.|year=1977|contribution=A new representation for linear lists|title=Conference Record of the Ninth Annual ACM Symposium on Theory of Computing|pages=49–60.] , and periodically refined since (e.g. a version usingAVL trees [citation|last=Tsakalidis|first=A. K.|year=1985|title=AVL-trees for localized search|journal=Information and Control|volume=67|pages=173–194.] , non-lazy finger trees, simpler 2-3 finger trees [citation|title=Finger Trees: A Simple General-purpose Data Structure|first1=Ralf|last1=Hinze|first2=Ross|last2=Paterson|journal=Journal of Functional Programming |volume=16|issue=2|year=2006|pages=197–217.] , and so on)ee also
*
Red-black tree References
External links
* [http://www.soi.city.ac.uk/~ross/papers/FingerTree.html]
* [http://hackage.haskell.org/packages/archive/EdisonCore/1.2.1.1/doc/html/Data-Edison-Concrete-FingerTree.html]
* [http://www.informatik.uni-bonn.de/~ralf/talks/BCTCS.pdf]
* [http://www.eecs.usma.edu/webs/people/okasaki/pubs.html]
* [http://blogs.msdn.com/ericlippert/archive/2008/02/12/immutability-in-c-part-eleven-a-working-double-ended-queue.aspx Example of 2-3 trees in C#]
* [http://dnovatchev.spaces.live.com/blog/cns!44B0A32C2CCF7488!582.entry Example of Hinze/Paterson Finger Trees in C#]
* [http://scala.sygneca.com/code/finger-trees Example of Hinze/Paterson Finger Trees in Scala]
Wikimedia Foundation. 2010.