Skip to main content

Module algorithms

Module algorithms 

Source
Expand description

Graph algorithms for knowledge graph analysis.

Provides algorithms for:

  • Neighborhood exploration (N-hop BFS with configurable max depth)
  • Pathfinding (shortest path between concepts)
  • Dependency analysis (prerequisites, topological ordering)
  • Centrality analysis (identifying important nodes)
  • Bridge detection (nodes connecting different clusters)

All algorithms are generic and operate on GraphData.

Structs§

CentralityScore
Centrality scores for a node.
NeighborhoodResult
Result of a neighborhood query.
PathResult
Result of a shortest path query.
PrerequisitesResult
Result of prerequisites analysis.

Functions§

calculate_centrality
Calculate centrality scores for all nodes.
find_bridges
Find bridge concepts connecting different clusters.
get_related
Get nodes related to a given node by specific relationship types.
neighborhood
Get the N-hop neighborhood around a node.
prerequisites_sorted
Get prerequisites for a concept in topological order.
shortest_path
Find the shortest path between two nodes using A* search.