skiplist (erlang_skiplist v0.3.0) View Source
Link to this section Summary
Functions
Get the value from the back of the skiplist. Does not mutate the skiplist.
Empties the skiplist.
Checks whether the skiplist contains the given
Value
.Removes consecutive duplicates items from the skiplist. Mutates the skiplist.
Get the value from the front of the skiplist. Does not mutate the skiplist.
Insert
Value
at the Index
of the skiplist.Returns
true
if the skiplist is empty, false
otherwise.Return length of the skiplist.
Modify the skiplist and insert
Value
at the given Index
.Create a new empty skiplist.
Get the value at the
nth
index of the skiplist. Does not mutate the skiplist.Pop from back of the skiplist. Mutates the existing skiplist.
Pop from front of the skiplist. Mutates the existing skiplist.
Push
Value
to the back of the skiplist.Push
Value
to the front of the skiplist.Remove the value at the specified index of the skiplist. Mutates the skiplist.
Converst the skiplist reference to erlang style list.
Create a new skiplist with specific
Capacity
.Link to this section Functions
Specs
back(Skiplist :: reference()) -> {ok, integer()} | {error, any()}.
Specs
clear(Skiplist :: reference()) -> ok | {error, any()}.
Specs
contains(Skiplist :: reference(), Value :: integer()) -> boolean().
Value
.
Specs
dedup(Skiplist :: reference()) -> ok.
Specs
front(Skiplist :: reference()) -> {ok, integer()} | {error, any()}.
Specs
insert(Skiplist :: reference(), Value :: integer(), Index :: non_neg_integer()) -> ok | {error, any()}.
Value
at the Index
of the skiplist.
Specs
is_empty(Skiplist :: reference()) -> boolean().
true
if the skiplist is empty, false
otherwise.
Specs
len(Skiplist :: reference()) -> non_neg_integer().
Specs
modify(Skiplist :: reference(), Value :: integer(), Index :: non_neg_integer()) -> ok | {error, any()}.
Value
at the given Index
.
Specs
new() -> {ok, reference()} | {error, any()}.
Specs
nth(Skiplist :: reference(), Index :: non_neg_integer()) -> {ok, integer()} | {error, any()}.
nth
index of the skiplist. Does not mutate the skiplist.
Specs
pop_back(Skiplist :: reference()) -> {ok, integer()} | {error, any()}.
Specs
pop_front(Skiplist :: reference()) -> {ok, integer()} | {error, any()}.
Specs
push_back(Skiplist :: reference(), Value :: integer()) -> ok | {error, any()}.
Value
to the back of the skiplist.
Specs
push_front(Skiplist :: reference(), Value :: integer()) -> ok | {error, any()}.
Value
to the front of the skiplist.
Specs
remove(Skiplist :: reference(), Index :: non_neg_integer()) -> {ok, integer()} | {error, any()}.
Specs
to_list(Skiplist :: reference()) -> [integer()].
Specs
with_capacity(Capacity :: pos_integer()) -> {ok, reference()} | {error, any()}.
Capacity
.