diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8438b5d..2ee8352 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Flat_Tree 0.0.1a3 (2019-07-01) ============================== Improved Documentation --------- +---------------------- - Use the sphinx_rtd_theme. - Attempt to clarify sections using better navigation. diff --git a/documentation/source/example.rst b/documentation/source/example.rst new file mode 100644 index 0000000..04dda6a --- /dev/null +++ b/documentation/source/example.rst @@ -0,0 +1,24 @@ +******* +Example +******* + +You can represent a binary tree in a simple flat list using the following structure. + +.. code-block:: python + + """ + + 3 + 1 5 + 0 2 4 6 ... + + """ + +This module exposes a series of functions to help you build and maintain this data structure. + +.. code-block:: python + + from flat_tree import FlatTreeAccessor + + tree_access = FlatTreeAccessor() + tree_access.index(1, 0) # get index @ depth: 1, offset: 0