Available on crate feature
readwrite only.Expand description
Incidence-matrix read/write (XGI xgi/readwrite/incidence.py port).
Deviation from XGI: we emit integer 0/1 cells (not numpy %.18e) and read any
non-zero cell as membership. Our writer + reader round-trip together; node/edge
ids are positional (“0”..“k-1”) on read, matching from_incidence_matrix.
Functions§
- read_
incidence_ matrix - Read a dense incidence matrix into a hypergraph with positional ids.
XGI
read_incidence_matrix(viafrom_incidence_matrix). - write_
incidence_ matrix - Write the dense incidence matrix: rows = nodes (node-id order), cols = edges
(edge-id order), cell = 1 if the node is a member. XGI
write_incidence_matrix.