This module provide a set of graph concepts to form a graph interface
Bases: exceptions.Exception
base class of all graph exceptions
Bases: core.graph.interface.graph.GraphError, exceptions.KeyError
exception raised when a wrong edge id is provided
Bases: core.graph.interface.graph.GraphError, exceptions.KeyError
exception raised when a wrong vertex id is provided
Bases: object
Definition of a graph seen as a list of edges
retrieve the edges linked to a specified vertex, all if vid is None
Parameters: | vid (vid) -- id of the reference vertex, default=None |
---|---|
Return type: | iter of eid |
retrieve the edges linked to a specified vertex, oriented inside the vertex
Parameters: | vid (vid) -- id of the reference vertex, default=None |
---|---|
Return type: | iter of eid |
number of edges linked to a specified vertex, total number if vid is None
Parameters: | vid (vid) -- id of the reference vertex, default=None |
---|---|
Return type: | iter of eid |
number of edges linked to a specified vertex, oriented inside vertex
Parameters: | vid (vid) -- id of the reference vertex, default=None |
---|---|
Return type: | iter of eid |
Bases: object
allow the graph to be extended by another graph
Bases: object
Directed graph definition
find the matching edges with same source and same target return None if it don't succeed
Parameters: |
|
---|---|
Types: |
|
Return type: | eid|iter of eid|None |
test wether an edge belong to the graph
Parameters: | eid (eid) -- edge id to test |
---|---|
Return type: | bool |
test wether a vertex belong to the graph
Parameters: | vid (vid) -- vertex id to test |
---|---|
Return type: | bool |
Bases: object
definition of graph edition methods for edges
Bases: object
definition of graph edition methods for vertices
Bases: object
interface of a graph seen as a vertex list
iterator on the neighbors of vid where edges are directed from neighbor to vid
Parameters: | vid (vid) -- id of the reference vertex |
---|---|
Return type: | iter of vid |
number of neighbors such as edges are directed from neighbor to vid
Parameters: | vid (vid) -- id of the reference vertex |
---|---|
Return type: | int |
number of neighbors regardless of the orientation of the edge
Parameters: | vid (vid) -- id of the reference vertex |
---|---|
Return type: | int |
number of neighbors such as edges are directed from vid to neighbor
Parameters: | vid (vid) -- id of the reference vertex |
---|---|
Return type: | int |
iterator on the neighbors of vid regardless of the orientation of the edge
Parameters: | vid (vid) -- id of the reference vertex |
---|---|
Return type: | iter of vid |