Versions

Description

**RubyTree** is a pure Ruby implementation of the generic `tree data structure <http://en.wikipedia.org/wiki/Tree_%28data_structure%29>`_. It provides a node-based model to store named nodes in the tree, and provides simple APIs to access, modify and traverse the structure. The implementation is *node-centric*, where individual nodes in the tree are the primary structural elements. All common tree-traversal methods (`pre-order <http://en.wikipedia.org/wiki/Tree_traversal#Pre-order>`_, `post-order <http://en.wikipedia.org/wiki/Tree_traversal#Post-order>`_, and `breadth-first <http://en.wikipedia.org/wiki/Breadth-first_search>`_) are supported. The library mixes in the `Enumerable <http://ruby-doc.org/core-1.9.3/Enumerable.html>`_ and `Comparable <http://ruby-doc.org/core-1.8.7/Comparable.html>`_ modules to allow access to the tree as a standard collection (iteration, comparison, etc.). A `Binary tree <http://en.wikipedia.org/wiki/Binary_tree>`_ is also provided, which provides the `in-order <http://en.wikipedia.org/wiki/Tree_traversal#In-order>`_ traversal in addition to the other methods. **RubyTree** supports importing from, and exporting to `JSON <http://flori.github.com/json>`_, and also supports the Ruby's standard object `marshaling <http://ruby-doc.org/core-1.8.7/Marshal.html>`_. This is a `BSD licensed <http://opensource.org/licenses/bsd-license.php>`_ open source project, and is hosted at `http://github.com/evolve75/RubyTree <http://github.com/evolve75/RubyTree>`_, and is available as a standard gem from `http://rubygems.org/gems/rubytree <http://rubygems.org/gems/rubytree>`_. The home page for **RubyTree** is at `http://rubytree.anupamsg.me <http://rubytree.anupamsg.me>`_.

Repository

https://github.com/evolve75/RubyTree

Project Slug

rubytree

Last Built

10 months, 2 weeks ago passed

Maintainers

Home Page

http://rubytree.anupamsg.me/

Badge

Tags

data-structure, gem, library, ruby, tree

Short URLs

rubytree.readthedocs.io
rubytree.rtfd.io

Default Version

latest

'latest' Version

master