VaneDB 0.1.0
Embeddable vector database for edge AI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
vanedb::MMapVectorStore Class Reference

#include <mmap_vector_store.h>

Public Member Functions

 MMapVectorStore (const std::string &filename)
 
 ~MMapVectorStore ()
 
 MMapVectorStore (const MMapVectorStore &)=delete
 
MMapVectorStoreoperator= (const MMapVectorStore &)=delete
 
 MMapVectorStore (MMapVectorStore &&o) noexcept
 
MMapVectorStoreoperator= (MMapVectorStore &&o) noexcept
 
const float * get (uint64_t id) const
 
bool contains (uint64_t id) const
 
std::vector< SearchResultsearch (const float *query, size_t k) const
 
size_t size () const
 
size_t dimension () const
 
DistanceMetric metric () const
 

Static Public Attributes

static constexpr uint32_t MAGIC = 0x42445651
 
static constexpr uint32_t VERSION = 1
 
static constexpr size_t HEADER_SIZE = 32
 

Detailed Description

Definition at line 36 of file mmap_vector_store.h.

Constructor & Destructor Documentation

◆ MMapVectorStore() [1/3]

vanedb::MMapVectorStore::MMapVectorStore ( const std::string &  filename)
inlineexplicit

Definition at line 42 of file mmap_vector_store.h.

References HEADER_SIZE, MAGIC, and VERSION.

◆ ~MMapVectorStore()

vanedb::MMapVectorStore::~MMapVectorStore ( )
inline

Definition at line 116 of file mmap_vector_store.h.

◆ MMapVectorStore() [2/3]

vanedb::MMapVectorStore::MMapVectorStore ( const MMapVectorStore )
delete

◆ MMapVectorStore() [3/3]

vanedb::MMapVectorStore::MMapVectorStore ( MMapVectorStore &&  o)
inlinenoexcept

Definition at line 120 of file mmap_vector_store.h.

Member Function Documentation

◆ contains()

bool vanedb::MMapVectorStore::contains ( uint64_t  id) const
inline

Definition at line 157 of file mmap_vector_store.h.

◆ dimension()

size_t vanedb::MMapVectorStore::dimension ( ) const
inline

Definition at line 173 of file mmap_vector_store.h.

◆ get()

const float * vanedb::MMapVectorStore::get ( uint64_t  id) const
inline

Definition at line 152 of file mmap_vector_store.h.

◆ metric()

DistanceMetric vanedb::MMapVectorStore::metric ( ) const
inline

Definition at line 174 of file mmap_vector_store.h.

◆ operator=() [1/2]

MMapVectorStore & vanedb::MMapVectorStore::operator= ( const MMapVectorStore )
delete

◆ operator=() [2/2]

MMapVectorStore & vanedb::MMapVectorStore::operator= ( MMapVectorStore &&  o)
inlinenoexcept

Definition at line 136 of file mmap_vector_store.h.

◆ search()

std::vector< SearchResult > vanedb::MMapVectorStore::search ( const float *  query,
size_t  k 
) const
inline

Definition at line 159 of file mmap_vector_store.h.

◆ size()

size_t vanedb::MMapVectorStore::size ( ) const
inline

Definition at line 172 of file mmap_vector_store.h.

Member Data Documentation

◆ HEADER_SIZE

constexpr size_t vanedb::MMapVectorStore::HEADER_SIZE = 32
staticconstexpr

Definition at line 40 of file mmap_vector_store.h.

Referenced by MMapVectorStore().

◆ MAGIC

constexpr uint32_t vanedb::MMapVectorStore::MAGIC = 0x42445651
staticconstexpr

Definition at line 38 of file mmap_vector_store.h.

Referenced by MMapVectorStore(), and vanedb::MMapVectorStoreBuilder::save().

◆ VERSION

constexpr uint32_t vanedb::MMapVectorStore::VERSION = 1
staticconstexpr

Definition at line 39 of file mmap_vector_store.h.

Referenced by MMapVectorStore(), and vanedb::MMapVectorStoreBuilder::save().


The documentation for this class was generated from the following file: