Skip to main content

Module knowledge_base

Module knowledge_base 

Source
Expand description

KnowledgeBase trait and in-memory implementation.

The trait returns owned records, not references. That costs a clone per hit and buys two things a reference-returning trait cannot have: a backend that pages, streams or queries a remote store (a reference has to point at something the base already holds in memory), and an implementation that does not have to keep a duplicate Vec alive purely to have something to lend out.

Only record, all and len are required. Every query — search, research lines, trends, change points, lineage, retrieval — has a default implementation over all(), so a new backend gets the whole analytics surface by implementing three methods, and the analytics themselves live in one place instead of once per backend.

Structs§

Lineage
An experiment in context: where it came from and what came of it.
LineageNode
One node of a lineage tree, with its distance from the focus.
MemoryKnowledgeBase
In-memory knowledge base implementation.

Traits§

KnowledgeBase
Trait for knowledge base backends.

Functions§

build_lineage
Walk parents up and children down from id.
research_lines_of
Group records into research lines with a trend per line.