Expand description
C-compatible FFI bindings.
Functions§
- amem_
graph_ ⚠add_ edge - Add an edge. Returns AMEM_OK or error code.
- amem_
graph_ ⚠add_ node - Add a node. Returns the assigned node ID, or -1 on error.
- amem_
graph_ ⚠correct - Record a correction. Returns new node ID or error.
- amem_
graph_ ⚠dimension - Get dimension.
- amem_
graph_ ⚠edge_ count - Get edge count.
- amem_
graph_ ⚠free - Free a graph handle.
- amem_
graph_ ⚠get_ confidence - Get a node’s confidence. Returns -1.0 if not found.
- amem_
graph_ ⚠get_ content - Get a node’s content. Writes to buffer. Returns content length or error.
- amem_
graph_ ⚠get_ edges - Get edges from a node. Returns edge count or error.
- amem_
graph_ ⚠get_ event_ type - Get a node’s event type. Returns -1 if not found.
- amem_
graph_ new - Create a new empty graph. Returns handle or NULL on failure.
- amem_
graph_ ⚠node_ count - Get node count.
- amem_
graph_ ⚠open - Load a graph from an .amem file. Returns handle or NULL on failure.
- amem_
graph_ ⚠resolve - Resolve: follow SUPERSEDES chain. Returns final node ID or error.
- amem_
graph_ ⚠save - Save a graph to an .amem file. Returns AMEM_OK or error code.
- amem_
graph_ ⚠touch - Touch a node (update access tracking).
- amem_
graph_ ⚠traverse - Traverse from a start node. Returns visited count.