Skip to main content

Crate helix_graph_algorithms

Crate helix_graph_algorithms 

Source
Expand description

Storage-independent graph representation and native graph algorithms.

The crate deliberately has no dependency on Helix storage, query planning, async runtimes, or SDK bindings. SDKs query Helix once, construct a validated Graph, and reuse that immutable graph for any number of local algorithms.

use helix_graph_algorithms::{Edge, Graph, GraphKind, Node};

let graph = Graph::new(
    GraphKind::DiGraph,
    [Node::new("a"), Node::new("b")],
    [Edge::new("ab", "a", "b")],
)?;
assert_eq!(graph.node_count(), 2);
assert_eq!(graph.edge_count(), 1);

Modules§

loader
Validation boundary for graph-query response bytes.

Structs§

BetweennessOptions
Node and edge betweenness options.
Community
One canonical community.
CommunityResult
Louvain partition and diagnostics.
Cycle
One canonical simple cycle. The first node is not repeated at the end.
CycleOptions
Bounded cycle-enumeration options.
CycleResult
Bounded cycle output and truncation state.
Edge
Immutable edge input and public edge record.
EdgeId
Collision-free identity for a stored edge or a synthesized reversal.
EdgeScore
One stable edge centrality score.
Graph
Validated immutable graph used by every native algorithm.
GraphProperty
Property selected as a graph identity source.
LayoutOptions
Deterministic Fruchterman-Reingold layout options.
LeidenOptions
Weighted Leiden options matching Graphify’s graspologic defaults while making convergence work explicitly bounded.
LeidenResult
Canonical weighted Leiden partition and diagnostics.
LouvainOptions
Proper weighted multi-level Louvain options.
Node
Immutable node input and public node record.
NodeDegree
One deterministic node degree record.
NodePosition
One final two-dimensional node position.
NodeScore
One node centrality score.
NonNegativeFiniteF64
Finite floating-point value greater than or equal to zero.
PathEdge
One edge in a found path.
PositiveFiniteF64
Finite floating-point value strictly greater than zero.
TraversalOptions
Complete Graphify-compatible traversal options.
TraversalResult
Stable traversal output.
TraversedEdge
Edge responsible for one discovery.
Visit
One visited node.

Enums§

BetweennessMode
Source-selection policy for Brandes centrality.
DegreeKind
Degree flavor.
EdgeTraversalDirection
Whether an edge was traversed with or against its stored orientation.
ExternalId
Lossless, deterministically ordered external graph identity.
GraphError
Graph construction or lookup failure.
GraphKind
Declared graph topology contract.
HubExpansionPolicy
Whether high-degree nodes may expand their adjacency.
IdentitySelection
Explicit node identity selection contract.
PathResult
Exhaustive local shortest-path result states.
PathWeight
Whether shortest paths use edge weights.
TraversalDirection
Direction used by local graph traversals.
TraversalStrategy
Traversal algorithm.

Type Aliases§

Attributes
Selected immutable properties attached to a node, edge, or graph.
NodeId
Opaque external node identifier returned to SDK callers.