Create a full bipartite graph
Bipartite graphs are also called two-mode by some. This function creates a bipartite graph in which every possible edge is present.
make_full_bipartite_graph(n1, n2, directed = FALSE, mode = c("all", "out", "in"))
- The number of vertices of the first kind.
- The number of vertices of the second kind.
- Logical scalar, whether the graphs is directed.
- Scalar giving the kind of edges to create for directed graphs.
If this is
then all vertices of the first kind are connected to the others;
specifies the opposite direction;
- Passed to
Bipartite graphs have a
FALSE for the vertices of the first kind and
TRUE for vertices of the second kind.
- An igraph graph, with the
vertex attribute set.
make_full_graph for creating one-mode full graphs
g <- make_full_bipartite_graph(2, 3) g2 <- make_full_bipartite_graph(2, 3, dir=TRUE) g3 <- make_full_bipartite_graph(2, 3, dir=TRUE, mode="in") g4 <- make_full_bipartite_graph(2, 3, dir=TRUE, mode="all")