Locally-Adaptive Vector Quantization

Data Loaders and Compressors

template<size_t Primary, size_t Residual = 0, size_t Extent = Dynamic, LVQPackingStrategy Strategy = Sequential, typename Alloc = lib::Allocator<std::byte>>
class LVQDataset

Public Functions

inline size_t primary_dataset_alignment() const

Return the alignment of the primary dataset.

inline const_value_type get_datum(size_t i) const

Access both levels of the two-level dataset.

Return a type that lazily combines the primary and residual.

inline void prefetch(size_t i) const

Prefetch data in the first and second level datasets.

inline const_primary_value_type get_primary(size_t i) const

Access only the first level of the dataset.

inline void prefetch_primary(size_t i) const

Prefetch only the primary dataset.

Utilities and Helpers

struct Reload

Dispatch type indicating that a compressed dataset should be reloaded directly.

LVQ based loaders can either perform dataset compression online, or reload a previously saved dataset.

Using this type in LVQ loader constructors indicates that reloading is desired.

Public Functions

inline explicit Reload(const std::filesystem::path &directory)

Construct a new Reloader.

Parameters:

directory – The directory where a LVQ compressed dataset was previously saved.