Vertex–edge incidence matrix (columns follow graph.edges()): undirected edges mark both endpoints with 1; directed arcs use −1 at the source and +1 at the target.
graph.edges()
Vertex–edge incidence matrix (columns follow
graph.edges()): undirected edges mark both endpoints with 1; directed arcs use −1 at the source and +1 at the target.