as.bipartite: Hypergraph as a bipartite graph.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/as.bipartite.R

Description

Converts a hypergraph (or graph) into a bipartite graph.

Usage

1

Arguments

h

a hypergraph or a graph.

Details

This converts a hypergraph or a graph into a bipartite graph, by taking the incidence matrix and treating this as the incidence matrix of a bipartite graph. It uses graph_from_incidence_matrix to perform the conversion.

Value

an igraph bipartite graph.

Note

This works on graphs, resulting in the bipartite graph with edges as one type and vertices as another. This might not be what you want, for example if you think the graph is already bipartite, this will not return the graph, but will rather create a new bipartite graph from the vertices and edges.

Author(s)

David J. Marchette dmarchette@gmail.com.

See Also

graph_from_incidence_matrix.

Examples

1
2
3
4
   h <- hypergraph_from_edgelist(list(letters[1:3],
           letters[c(2,4,7)],
  		  	  letters[5:8]))
   g <- as.bipartite(h)

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

Related to as.bipartite in HyperG...