Continuum C++ API
Unified runtime for token + tensor execution
Loading...
Searching...
No Matches
continuum::runtime::MemoryGraphStore Class Reference

#include <memory_graph.hpp>

Classes

struct  RetrievalResult
 

Public Member Functions

 MemoryGraphStore (std::size_t max_nodes=8192)
 
std::uint64_t add_node (MemoryNode node)
 
std::optional< MemoryNode > get_node (std::uint64_t id) const
 
std::vector< RetrievalResult > retrieve_similar (const std::vector< float > &query_embedding, std::size_t max_results=5, float min_similarity=0.7f, const std::string &cache_namespace={}) const
 
void clear ()
 
std::size_t size () const
 
std::size_t max_nodes () const
 Capacity in nodes passed at construction.
 
std::size_t estimated_bytes () const
 Approximate resident bytes: content, embeddings, ids, and per-node overhead.
 

Detailed Description

Memory-graph recall tier: an append-only log of prompt / completion nodes retrieved by embedding similarity.

Eviction: first-in-first-out by insertion order. Recall is a scan, so a read does not refresh a node; when size() reaches max_nodes the oldest node is dropped before the new one is added.

Constructor & Destructor Documentation

◆ MemoryGraphStore()

continuum::runtime::MemoryGraphStore::MemoryGraphStore ( std::size_t  max_nodes = 8192)
explicit

Member Function Documentation

◆ add_node()

std::uint64_t continuum::runtime::MemoryGraphStore::add_node ( MemoryNode  node)

◆ clear()

void continuum::runtime::MemoryGraphStore::clear ( )

◆ estimated_bytes()

std::size_t continuum::runtime::MemoryGraphStore::estimated_bytes ( ) const

Approximate resident bytes: content, embeddings, ids, and per-node overhead.

◆ get_node()

std::optional< MemoryNode > continuum::runtime::MemoryGraphStore::get_node ( std::uint64_t  id) const

◆ max_nodes()

std::size_t continuum::runtime::MemoryGraphStore::max_nodes ( ) const
inline

Capacity in nodes passed at construction.

◆ retrieve_similar()

std::vector< RetrievalResult > continuum::runtime::MemoryGraphStore::retrieve_similar ( const std::vector< float > &  query_embedding,
std::size_t  max_results = 5,
float  min_similarity = 0.7f,
const std::string &  cache_namespace = {} 
) const

◆ size()

std::size_t continuum::runtime::MemoryGraphStore::size ( ) const

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