as.bipartite {HyperG}R Documentation

Hypergraph as a bipartite graph.

Description

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

Usage

as.bipartite(h)

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

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



[Package HyperG version 1.0.0 Index]