webgraph
Python bindings for the Rust version of the WebGraph framework.
A compressed graph in WebGraph format.
Provides forward-only access (successors) and BFS traversal. For backward (predecessor) access, load the transposed graph.
Return the number of successors of the given node.
Raises IndexError if node is out of range.
Return an iterator over the successors of the given node.
Raises IndexError if node is out of range.
Return a numpy uint32 array of outdegrees for all nodes, computed
in parallel. The array is indexed by node ID.
Return a (k, 2) array: column 0 = node IDs, column 1 = outdegrees.
BFS over all connected components.
Yields (root, parent, node, distance) tuples where root
identifies the BFS tree (starting node of the component),
parent is the node from which node was discovered (equal to
node for roots), and distance is the hop count from root.
Iterator over node IDs (successors or predecessors).
Iterator for breadth-first traversal.
Yields (root, parent, node, distance) tuples where root
identifies the BFS tree, parent is the node from which node
was discovered (equal to node for roots), and distance is the
hop count from root.