__init__([data]) |
|
add_edge(u, v[, key, attr_dict]) |
Add an edge between u and v. |
add_edges_from(ebunch[, attr_dict]) |
Add all the edges in ebunch. |
add_node(n[, attr_dict]) |
Add a single node n and update node attributes. |
add_nodes_from(nodes, **attr) |
Add multiple nodes. |
add_weighted_edges_from(ebunch[, weight]) |
Add all the edges in ebunch as weighted edges with specified weights. |
adjacency() |
Return an iterator over (node, adjacency dict) tuples for all nodes. |
clear() |
Remove all nodes and edges from the graph. |
copy([with_data]) |
Return a copy of the graph. |
degree([nbunch, weight]) |
Return an iterator for (node, degree) or degree for single node. |
edge_subgraph(edges) |
Returns the subgraph induced by the specified edges. |
edges([nbunch, data, keys, default]) |
Return an iterator over the edges. |
get_edge_data(u, v[, key, default]) |
Return the attribute dictionary associated with edge (u,v). |
has_edge(u, v[, key]) |
Return True if the graph has an edge between nodes u and v. |
has_node(n) |
Return True if the graph contains the node n. |
has_predecessor(u, v) |
Return True if node u has predecessor v. |
has_successor(u, v) |
Return True if node u has successor v. |
in_degree([nbunch, weight]) |
Return an iterator for (node, in-degree) or in-degree for single node. |
in_edges([nbunch, data, keys]) |
Return an iterator over the incoming edges. |
is_directed() |
Return True if graph is directed, False otherwise. |
is_multigraph() |
Return True if graph is a multigraph, False otherwise. |
nbunch_iter([nbunch]) |
Return an iterator over nodes contained in nbunch that are also in the graph. |
neighbors(n) |
Return an iterator over successor nodes of n. |
nodes([data, default]) |
Returns an iterator over the nodes. |
nodes_with_selfloops() |
Returns an iterator over nodes with self loops. |
number_of_edges([u, v]) |
Return the number of edges between two nodes. |
number_of_nodes() |
Return the number of nodes in the graph. |
number_of_selfloops() |
Return the number of selfloop edges. |
order() |
Return the number of nodes in the graph. |
out_degree([nbunch, weight]) |
Return an iterator for (node, out-degree) or out-degree for single node. |
out_edges([nbunch, data, keys, default]) |
Return an iterator over the edges. |
predecessors(n) |
Return an iterator over predecessor nodes of n. |
remove_edge(u, v[, key]) |
Remove an edge between u and v. |
remove_edges_from(ebunch) |
Remove all edges specified in ebunch. |
remove_node(n) |
Remove node n. |
remove_nodes_from(nbunch) |
Remove multiple nodes. |
reverse([copy]) |
Return the reverse of the graph. |
selfloop_edges([data, keys, default]) |
Return a list of selfloop edges. |
size([weight]) |
Return the number of edges or total of all edge weights. |
subgraph(nbunch) |
Return the subgraph induced on nodes in nbunch. |
successors(n) |
Return an iterator over successor nodes of n. |
to_directed() |
Return a directed copy of the graph. |
to_undirected([reciprocal]) |
Return an undirected representation of the digraph. |