Protocol for polymorphic graph node operations.
All knowledge graph node types must implement this protocol to support uniform access to identity, embeddings, links, and type.
Summary
Functions
Returns the embedding vector, or nil if not set.
Returns the unique identifier of the node.
Returns all links grouped by edge type.
Returns the set of linked node IDs for a specific edge type.
Returns the atom identifying the node's type.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
Returns the embedding vector, or nil if not set.
Returns the unique identifier of the node.
@spec links(t()) :: %{required(Mnemosyne.Graph.Edge.edge_type()) => MapSet.t()}
Returns all links grouped by edge type.
@spec links(t(), Mnemosyne.Graph.Edge.edge_type()) :: MapSet.t()
Returns the set of linked node IDs for a specific edge type.
Returns the atom identifying the node's type.