This function decides whether the vertices of a network can be mapped to two vertex types in a way that no vertices of the same type are connected.
The input graph.
A bipartite graph in igraph has a ‘
type’ vertex attribute
giving the two vertex types.
This function simply checks whether a graph could be bipartite. It tries to find a mapping that gives a possible division of the vertices into two classes, such that no two vertices of the same class are connected by an edge.
The existence of such a mapping is equivalent of having no circuits of odd length in the graph. A graph with loop edges cannot bipartite.
Note that the mapping is not necessarily unique, e.g. if the graph has at least two components, then the vertices in the separate components can be mapped independently.
A named list with two elements:
A logical scalar,
A possibly vertex type mapping, a logical vector. If no such mapping exists, then an empty vector.
Gabor Csardi email@example.com
1 2 3 4 5 6 7 8 9 10 11 12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.