# graph.bipartite

0th

Percentile

##### Create a bipartite graph

A bipartite graph has two kinds of vertices and connections are only allowed between different kinds.

Keywords
graphs
##### Usage
graph.bipartite(types, edges, directed=FALSE)
is.bipartite(graph)
##### Arguments
types
A vector giving the vertex types. It will be coerced into boolean. The length of the vector gives the number of vertices in the graph.
edges
A vector giving the edges of the graph, the same way as for the regular graph function. It is checked that the edges indeed connect vertices of different kind, accoding to the supplied types
directed
Whether to create a directed graph, boolean constant. Note that by default undirected graphs are created, as this is more common for bipartite graphs.
graph
The input graph.
##### Details

Bipartite graphs have a 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.

graph.bipartite 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.

##### Value

• graph.bipartite returns a bipartite igraph graph. In other words, an igraph graph that has a vertex attribute named type.

is.bipartite returns a logical scalar.

##### concept

• Bipartite graph
• Two-mode network

graph to create one-mode networks

##### Aliases
• graph.bipartite
• is.bipartite
##### Examples
g <- graph.bipartite( rep(0:1,length=10), c(1:10))
print(g, v=TRUE)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.