ckpttncpp 0.2.3
  • Site
      • Library API
      • How this Version of ckpttncpp was Created
      • Using Intersphinx
  • Page
      • Template Class dllink
        • Template Parameter Order
        • Class Documentation
  • « Template Clas...
  • Class FMBiConstrMgr »
  • Source

Template Class dllink¶

  • Defined in File dllist.hpp

Page Contents

  • Template Parameter Order

  • Class Documentation

Template Parameter Order¶

  1. typename T

Class Documentation¶

template<typename T>
class dllink¶

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.

Public Functions

inline explicit constexpr dllink(T data) noexcept¶

Construct a new dllink object.

Parameters

data – [in] the data

constexpr dllink() = default¶

Copy construct a new dllink object (deleted intentionally)

~dllink() = default¶
dllink(const dllink&) = delete¶
constexpr auto operator=(const dllink&) -> dllink& = delete¶
constexpr dllink(dllink&&) noexcept = default¶
constexpr auto operator=(dllink&&) noexcept -> dllink& = default¶
inline constexpr auto lock() noexcept -> void¶

lock the node (and don’t append it to any list)

inline constexpr auto is_locked() const noexcept -> bool¶

whether the node is locked

Returns

true

Returns

false

inline constexpr auto is_empty() const noexcept -> bool¶

whether the list is empty

Returns

true

Returns

false

inline constexpr auto clear() noexcept -> void¶

reset the list

inline constexpr auto detach() noexcept -> void¶

detach from a list

inline constexpr auto appendleft(dllink &node) noexcept -> void¶

append the node to the front

Parameters

node – [inout]

inline constexpr auto append(dllink &node) noexcept -> void¶

append the node to the back

Parameters

node – [inout]

inline constexpr auto popleft() noexcept -> dllink&¶

pop a node from the front

Precondition: list is not empty

Returns

dllink&

inline constexpr auto pop() noexcept -> dllink&¶

pop a node from the back

Precondition: list is not empty

Returns

dllink&

inline constexpr auto begin() noexcept -> dll_iterator<T>¶

begin

Returns

dll_iterator

inline constexpr auto end() noexcept -> dll_iterator<T>¶

end

Returns

dll_iterator

Public Members

T data = {}¶

data

Back to top

© Copyright 2019, Wai-Shing Luk.
Created using Sphinx 4.0.2.