flist v0.2.2-dev FList.FTree View Source
In this module, we define the bottom data structure fingertree, which is used by FList. Similarly, if you are not to customize your own FingerTree wrapper, it is recommended to used the methods defined in the module of FList rather that those defined here.
Link to this section Summary
Functions
Concat two list tree
Add an element to the front
Get a new tree with the element at the pointed position deleted
Generate a tree from a list
Get the element from a tree at the pointed position
Get the first element
Get the list tree with the back element popped
Get the last element
Get a new list tree with the element at the pointed position moved to the front
Update the element at the pointed position
Reture the size of a tree
Add an element to the back
Split the list tree at the pointed position
Get the list tree with the front element popped
Turn the given tree to a normal list
Pop the front element and return a tuple
Pop the element in the back and return a tuple
Link to this section Types
t() :: :Empty | {:Lf, FList.FNode.t()} | {:Tr, non_neg_integer(), [FList.FNode.t()], t(), [FList.FNode.t()]}
FList.FTree.t stands for the data structure of fingertree.
Link to this section Functions
Concat two list tree.
Add an element to the front.
extract_at(t(), non_neg_integer()) :: {any(), t()}
Get a new tree with the element at the pointed position deleted.
Generate a tree from a list
Get the element from a tree at the pointed position.
Get the first element.
Get the list tree with the back element popped.
Get the last element.
Get a new list tree with the element at the pointed position moved to the front.
Update the element at the pointed position.
Reture the size of a tree.
Add an element to the back.
split_at(t(), non_neg_integer()) :: {t(), any(), t()}
Split the list tree at the pointed position.
Get the list tree with the front element popped.
Turn the given tree to a normal list.
Pop the front element and return a tuple.
Pop the element in the back and return a tuple.