[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
General purpose tree data structure
From: |
Narendra Joshi |
Subject: |
General purpose tree data structure |
Date: |
Mon, 13 Feb 2017 03:19:19 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi,
Is there a general purpose, performant tree data structure in Emacs Lisp?
I mainly need the ability to
1) Query for the children of a node.
2) Query for the parent of a node.
3) Store an integer at every node of the tree including the leaves.
4) Given a node walk through the sub-tree rooted at it printing the
sequence of nodes from the root to a leaf every time a leaf is
encountered.
I saw `avl-tree' but I don't want to balance the tree in any way. Maybe,
it's best to just build my own set of functions that use cons cells. I
would rather prefer to use an already existing library if there is
one. How does `org-mode' accomplish this?
--
Narendra Joshi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- General purpose tree data structure,
Narendra Joshi <=