#[non_exhaustive]pub enum EngineConfig {
CompactBfs,
EulerTour,
Hdt,
ClusterForest,
}Expand description
The implementation chosen when creating a graph.
Selection is immutable for the lifetime of a ConnectivityGraph.
No automatic switching or answer cache is introduced by this configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CompactBfs
Compact adjacency with a fresh BFS for each connectivity query.
EulerTour
Euler-tour forest with candidate-pruned replacement search: a stable interface for an experimental engine.
This is not HDT and does not provide polylogarithmic update bounds.
The variant, its selector "ett" (EngineConfig::as_str) and the
ForestGraph API stay compatible across 1.x, like
EngineConfig::Hdt: they are removed or renamed only after a
deprecation and in a major release, and #[non_exhaustive] on this
enum does not authorize removing them. “Experimental” qualifies only the
engine’s performance, maturity and usage recommendation
(EngineConfig::is_experimental returns true).
Hdt
Deterministic HDT with level-based replacement search: a stable interface for an experimental engine.
The variant, its selector "hdt" (EngineConfig::as_str) and the
HdtGraph API stay compatible across 1.x: they are removed or
renamed only after a deprecation and in a major release, and
#[non_exhaustive] on this enum does not authorize removing them.
“Experimental” qualifies only the engine’s performance, maturity and
usage recommendation (EngineConfig::is_experimental returns true):
it carries no performance, latency or memory promise, lifecycle support
is not available, and EngineConfig::CompactBfs remains the default.
ClusterForest
Cluster forest (Wulff-Nilsen, SODA 2013, §3, with the path compression of De Man et al., PVLDB 2025, §4): a stable interface for an experimental engine, new in 1.1.
The variant and its selector "cluster-forest"
(EngineConfig::as_str) stay compatible across 1.x like
EngineConfig::EulerTour and EngineConfig::Hdt: they are
removed or renamed only after a deprecation and in a major release,
and #[non_exhaustive] on this enum does not authorize removing them.
“Experimental” qualifies only the engine’s performance, maturity and
usage recommendation (EngineConfig::is_experimental returns
true): it carries no performance, latency or memory promise, and
EngineConfig::CompactBfs remains the default. The backend type
itself is internal: use the engine through ConnectivityGraph or
crate::LifecycleGraph, which supports it.
Updates are O(log² N) amortized by this project’s derivation for
this variant (ADR 0014), not by a published theorem; queries walk to
the roots in O(log N). It accepts at most 2²⁸ vertices and 2²⁸ edges
and reports more as GraphError::NodeLimitExceeded or
GraphError::EdgeLimitExceeded carrying that limit (or the
configured GraphLimits value, when lower). Under
crate::LifecycleGraph the enforced limits are 2²⁷ − 512 nodes and
2²⁸ edges, leaving room for retired slots. Through
ConnectivityGraph the configured limits are checked first (node
before edge), then the engine’s capacity: at that capacity a
configured edge limit can therefore be reported before the engine’s
node capacity.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn is_experimental(self) -> bool
pub fn is_experimental(self) -> bool
Whether this engine is qualified as experimental: its performance, maturity and usage recommendation carry no promise, although its public interface may be stable.
Returns false for EngineConfig::CompactBfs and true for
EngineConfig::EulerTour, EngineConfig::Hdt and
EngineConfig::ClusterForest in this release. The value for the
experimental engines may stay true for the whole 1.x
series; it becomes false only when an engine is promoted, in a minor
release that records it in the release notes, and it never changes
from false to true for an existing engine. The value says nothing about the interface’s
stability class: both variants are stable interfaces either way. The
server reports the same value as the experimental field of
GET /v1/info.
§Examples
use knotrel_core::EngineConfig;
assert!(!EngineConfig::CompactBfs.is_experimental());
assert!(EngineConfig::EulerTour.is_experimental());
assert!(EngineConfig::Hdt.is_experimental());
assert!(EngineConfig::ClusterForest.is_experimental());
assert_eq!(EngineConfig::Hdt.as_str(), "hdt");
assert_eq!(EngineConfig::ClusterForest.as_str(), "cluster-forest");