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)
~Dllink() defaulted
Dllink(const Dllink&) deleted
Dllink(Dllink&&) defaulted constexpr noexcept

Public functions

auto operator=(const Dllink&) -> Dllink & -> auto deleted constexpr
auto operator=(Dllink&&) noexcept -> Dllink & -> auto defaulted constexpr
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

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

Variable documentation

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

data