Undocumented

Function | `_get` |
Returns the adjacency matrix of a graph. |

Function | `_get` |
Returns the adjacency matrix of a graph as a SciPy CSR matrix. |

Function | `_get` |
Returns the adjacency list representation of the graph. |

Function | `_get` |
Returns the incidence matrix of a bipartite graph. The incidence matrix is an n times m matrix, where n and m are the number of vertices in the two vertex classes. |

Function | `_get` |
Returns the incidence list representation of the graph. |

Returns the adjacency matrix of a graph.

Parameters | |

self | Undocumented |

type | either GET_ADJACENCY_LOWER (uses the lower triangle of the matrix) or GET_ADJACENCY_UPPER (uses the upper triangle) or GET_ADJACENCY_BOTH (uses both parts). Ignored for directed graphs. |

attribute | if None, returns the ordinary adjacency matrix. When the name of a valid edge attribute is given here, the matrix returned will contain the default value at the places where there is no edge or the value of the given attribute where there is an edge. Multiple edges are not supported, the value written in the matrix in this case will be unpredictable. This parameter is ignored if eids is True |

default | the default value written to the cells in the case of adjacency matrices with attributes. |

eids | specifies whether the edge IDs should be returned in the adjacency matrix. Since zero is a valid edge ID, the cells in the matrix that correspond to unconnected vertex pairs will contain -1 instead of 0 if eids is True. If eids is False, the number of edges will be returned in the matrix for each vertex pair. |

Returns | |

the adjacency matrix as a `Matrix` . |

Returns the adjacency matrix of a graph as a SciPy CSR matrix.

Parameters | |

self | Undocumented |

attribute | if None, returns the ordinary adjacency matrix. When the name of a valid edge attribute is given here, the matrix returned will contain the default value at the places where there is no edge or the value of the given attribute where there is an edge. |

Returns | |

the adjacency matrix as a scipy.sparse.csr_matrix. |

Returns the adjacency list representation of the graph.

The adjacency list representation is a list of lists. Each item of the outer list belongs to a single vertex of the graph. The inner list contains the neighbors of the given vertex.

Parameters | |

self | Undocumented |

mode | if "out", returns the successors of the vertex. If "in", returns the predecessors of the vertex. If "all"", both the predecessors and the successors will be returned. Ignored for undirected graphs. |

Returns the incidence matrix of a bipartite graph. The incidence matrix is an *n* times *m* matrix, where *n* and *m* are the number of vertices in the two vertex classes.

Parameters | |

graph | Undocumented |

types | an igraph vector containing the vertex types, or an attribute name. Anything that evalulates to False corresponds to vertices of the first kind, everything else to the second kind. |

*args | Undocumented |

**kwds | Undocumented |

Returns | |

the incidence matrix and two lists in a triplet. The first list defines the mapping between row indices of the matrix and the original vertex IDs. The second list is the same for the column indices. |

Returns the incidence list representation of the graph.

The incidence list representation is a list of lists. Each item of the outer list belongs to a single vertex of the graph. The inner list contains the IDs of the incident edges of the given vertex.

Parameters | |

graph | Undocumented |

mode | if "out", returns the successors of the vertex. If "in", returns the predecessors of the vertex. If "all", both the predecessors and the successors will be returned. Ignored for undirected graphs. |