Libtree
Introduction
Libtree is a general-purpose tree library that provides various tree structures and operations for them, implemented in Java. Below is an example of how to use Libtree.
OrderedTree<Integer> tree = new OrderedTree<Integer>(1); tree.add(2); tree.add(3); tree.getChildAt(0).add(4); System.out.println(tree);
The code above outputs the following:
1 |-- 2 | \`-- 4 \`-- 3
Requirements
You need the following software to run Libtree.
- Java 8
- Guava 18.0
Download
The latest version is 0.6.0. Libtree is available for download, and licensed under the GNU General Public License (version 2 or later).
Documentation
Citation
If you are using Annobase, please cite it as follows.
Jun Araki. 2011. Libtree: A General-purpose Tree Library. http://junaraki.net/software/libtree
.
Here is the corresponding BibTex entry for the citation:
@misc{Araki2011Libtree, author = {Jun Araki}, title = {{Libtree}: {A} General-purpose Tree Library}, howpublished = {\url{http://junaraki.net/software/libtree}}, year = {2011}, }
Change log
Libtree 0.6.0 (2015-05-10):
- Implemented breadth-first search in OrderedTree.
- Added minor enhancements, and fixed minor bugs.
Libtree 0.5.0 (2014-06-05):
- Implemented a class for a binary tree.
Libtree 0.4.0 (2014-04-02):
- Refactored the global design so the Tree interface supports operations on both an entire tree and an individual node without making a sharp distinction between them.
Libtree 0.3.2 (2012-10-07):
- Added the method toString() in AbstractedRootedTree to provide a string representation of a tree.
- Added a function to sort children of an ordered tree.
Libtree 0.3 (2011-06-30):
- Distinguished interfaces between Tree and RootedTree, and between TreeNode and RootedTreeNode.
- Added several basic operations for the siblings of a tree node.
- Implemented classes for a binary search tree with some basic operations for tree walks, insertion, and deletion.
Libtree 0.2 (2011-06-24):
- Added several basic operations for the root of a tree, and for the ancestors and descendants of a tree node.
- Implemented classes for an unordered tree and ordered tree.
Libtree 0.1 (2011-06-19):
- Initial release.
- Supported the most fundamental parts of the tree data structure and operations associated with it.