incidence_matrix: Graph Incidence Matrix.

Description Usage Arguments Details Value Author(s) Examples

View source: R/incidence_matrix.R

Description

Converts a graph to an incidence matrix. Not the bipartite version.

Usage

1
2

Arguments

g

a graph or hypergraph.

h

a hypergraph.

Details

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.

Value

A sparse incidence matrix.

Author(s)

David J. Marchette dmarchette@gmail.com

Examples

1
2
3
4
	set.seed(2343)
   g <- sample_gnp(10,.1)
	h <- hypergraph_from_edgelist(list(1:3,3:4,c(3,5,7)))
	

HyperG documentation built on March 4, 2021, 5:06 p.m.