Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aradzie/persistent

A collection of persistent data structures implemented in Java
https://github.com/aradzie/persistent

data-structures finger-tree hash-trie java persistent-data-structure

Last synced: about 2 months ago
JSON representation

A collection of persistent data structures implemented in Java

Awesome Lists containing this project

README

        

# A collection of [persistent data structures](https://en.wikipedia.org/wiki/Persistent_data_structure) written in Java

Any fool can write the [Finger Tree](https://en.wikipedia.org/wiki/Finger_tree)
data structure in [Haskell](https://www.haskell.org/), a purely functional
language with expressive type system and lazy evaluation. But can you do this
in Java, a vastly more verbose language with a weaker and clumsier type system?
This repository contains the Enterprise Edition of Finger Tree, a pointless and
stupid exercise, but very educational too. Because why not?

There are a few other persistent data structures too, such as:

* ArrayTrieHashMap
* PatriciaTrieHashMap
* Leaf-Leaning Red-Black Tree
* Queue, Stack, etc.

Probably none of this should be used in production, but might be used for the
educational purposes.

The inspiring list of publications:

* **Purely Functional Data Structures** by *Chris Okasaki*
* **Ideal Hash Trees** by *Phil Bagwell*
* **Finger trees: a simple general-purpose data structure** by *Ralf Hinze* and *Ross Paterson*
* **Left-LeaningRed-Black Trees** by *Robert Sedgewick*