template<typename T>
Dllink class

doubly linked node (that may also be a "head" a list)

A Doubly-linked List class. This class simply contains a link of node's. By adding a "head" node (sentinel), deleting a node is extremely fast (see "Introduction to Algorithm"). This class does not keep the length information as it is not necessary for the FM algorithm. This saves memory and run-time to update the length information. Note that this class does not own the list node. They are supplied by the caller in order to better reuse the nodes.

Constructors, destructors, conversion operators

Dllink(T data) explicit constexpr noexcept
Construct a new Dllink object.
Dllink() defaulted constexpr
Copy construct a new Dllink object (deleted intentionally)

Public functions

auto lock() noexcept -> void -> auto constexpr
lock the node (and don't append it to any list)
auto is_locked() const noexcept -> bool -> auto constexpr
whether the node is locked
auto detach() noexcept -> void -> auto constexpr
detach from a list

Public variables

Dllink* next
Dllink* prev
T data

Function documentation

template<typename T>
Dllink<T>::Dllink(T data) explicit constexpr noexcept

Construct a new Dllink object.

Parameters
data in the data

template<typename T>
auto Dllink<T>::is_locked() const noexcept -> bool constexpr

whether the node is locked

Returns True if the node is locked, false otherwise.

Variable documentation

template<typename T>
Dllink* Dllink<T>::next

pointer to the next node

template<typename T>
Dllink* Dllink<T>::prev

pointer to the previous node

template<typename T>
T Dllink<T>::data

data