Skip to main content

Crate graphrust_ffi

Crate graphrust_ffi 

Source
Expand description

§GraphRust FFI Bindings

C/C++ bindings for the graphrust library using CXX for modern C++ integration and cbindgen for C compatibility.

Modules§

cxx_bindings
CXX-based C++ FFI bindings
dijkstra
Dijkstra’s shortest path algorithm implementation.
pagerank
PageRank algorithm implementation.
triangle_count
Triangle counting algorithm implementation.

Structs§

FFIGraph
FFI-friendly wrapper for Graph that can be passed across language boundaries

Functions§

bfs_distances
Returns distances from the start node to all reachable nodes.
bfs_predecessors
Returns predecessor map for path reconstruction.
bfs_traverse
Returns nodes in BFS visit order from the start node.
clustering_coefficient
Computes the global clustering coefficient of the graph.
component_count
Returns the number of connected components.
connected_components
Returns all connected components in the graph.
create_graph_from_edges
Helper function to create a graph from edge list (for FFI)
dijkstra
Computes shortest distances from start node to all reachable nodes.
dijkstra_path
Computes the shortest path from start to end node.
dijkstra_with_predecessors
Computes shortest distances and predecessor map for path reconstruction.
node_component_map
Returns a map from each node to its component ID.
pagerank
Computes PageRank scores for all nodes using a fixed number of iterations.
pagerank_converge
Computes PageRank scores using convergence criterion.
top_k_pagerank
Returns top k nodes by PageRank score.
triangle_count
Counts the total number of triangles in the graph.
triangles_per_node
Counts triangles each node participates in.