Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_persistent_vector.H File Reference

Immutable bitmapped-vector trie with structural sharing. More...

#include <array>
#include <concepts>
#include <cstddef>
#include <limits>
#include <memory>
#include <type_traits>
#include <utility>
#include <ah-errors.H>
#include <tpl_array.H>
Include dependency graph for tpl_persistent_vector.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::PersistentVector< T >
 Immutable vector backed by a 32-way bitmapped trie. More...
 
struct  Aleph::PersistentVector< T >::Node
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Detailed Description

Immutable bitmapped-vector trie with structural sharing.

PersistentVector<T> is an in-memory persistent sequence. push_back, set and pop_back return new vector versions and never mutate existing versions. The implementation is a bitmapped vector trie with branching factor 32, so updates copy O(log_32 n) trie nodes and share the rest.

This container is volatile in-memory persistence, not file-backed durable storage. Published versions may be read concurrently by different threads; publishing a new version into shared state still requires external synchronization.

Definition in file tpl_persistent_vector.H.