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.
Doubly Linked List Structure: ┌─────────────────────────────────────┐ │ Head/Sentinel │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ └─▶│next │────▶│next │────▶│next │───┘ │ │ │ │ │ │ │prev│◀────│prev│◀────│prev│◀─┐ └─────┘ └─────┘ └─────┘ │ ▲ ▲ ▲ ▲ ▲ │ │ │ │ │ │ │ └─────────┼───┼───────┼───┼───┘ │ │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │Node1│ │Node2│ │Node3│ │Data │ │Data │ │Data │ └─────┘ └─────┘ └─────┘ Each node has 'next' and 'prev' pointers, with the head/sentinel serving as a boundary marker to simplify insertion/deletion.
Constructors, destructors, conversion operators
Public functions
Public variables
- T data
Function documentation
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