Template Class nested_forward_lists

Class Documentation

template<typename T, typename Index, Index NullValue>
class fwdpp::nested_forward_lists

Container of multiple owning forward lists with corresponding head/tail index vector describing where individual lists start/stop. Addition of a list at a new index creates null entries for intervening head/tail indexes as needed. Intended use is to track linked lists whose entry points (head) can be specified by integers. Const forward/backward iterator access is provided to the head vector.

Version

0.9.0 Added to library

Public Types

using const_iterator = typename std::vector<Index>::const_iterator
using const_reverse_iterator = typename std::vector<Index>::const_reverse_iterator

Public Functions

nested_forward_lists()
Index tail(Index at) const
Index head(Index at) const
Index next(Index at) const
template<typename ...Args>
void extend(Index at, Args&&... args)
template<typename Container>
void extend_from_container(Index at, const Container &c)
T &fetch(Index at)
const T &fetch(Index at) const
void nullify_list(Index at)
void reset(std::size_t newsize)
void clear()
void release_memory()
const_iterator begin() const
const_iterator end() const
const_reverse_iterator rbegin() const
const_reverse_iterator rend() const
Index convert_to_head_index(const_iterator i) const
Index convert_to_head_index(const_reverse_iterator i) const

Public Static Attributes

constexpr Index null = NullValue