powered by
Converts a graph to an incidence matrix. Not the bipartite version.
incidence_matrix(g) hypergraph_as_incidence_matrix(h)
a graph or hypergraph.
a hypergraph.
A sparse incidence matrix.
An incidence matrix has gorder(g) columns and gsize(g) rows. incidence_matrix can be called on either a graph or a hypergraph. It calls hypergraph_as_incidence_matrix in the latter case.
gorder(g)
gsize(g)
incidence_matrix
hypergraph_as_incidence_matrix
# NOT RUN { set.seed(2343) g <- sample_gnp(10,.1) h <- hypergraph_from_edgelist(list(1:3,3:4,c(3,5,7))) # }
Run the code above in your browser using DataLab