is_bipartite(graph)make_bipartite_graph(types, edges, directed = FALSE)
bipartite_graph(...)
graph function. It is checked that the edges indeed
connect vertices of different kind, accoding to the supplied types
vectmake_bipartite_graph.make_bipartite_graph returns a bipartite igraph graph. In other
words, an igraph graph that has a vertex attribute named type.is_bipartite returns a logical scalar.
type vertex attribute in igraph, this is
boolean and FALSE for the vertices of the first kind and TRUE
for vertices of the second kind.make_bipartite_graph basically does three things. First it checks tha
edges vector against the vertex types. Then it creates a graph
using the edges vector and finally it adds the types vector as
a vertex attribute called type.
is_bipartite checks whether the graph is bipartite or not. It just
checks whether the graph has a vertex attribute called type.
graph to create one-mode networksg <- make_bipartite_graph( rep(0:1,length=10), c(1:10))
print(g, v=TRUE)Run the code above in your browser using DataLab