networkx.classes.OrderedMultiGraph

class networkx.classes.OrderedMultiGraph(data=None, **attr)[source]
__init__(data=None, **attr)

Methods

__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.
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 all neighbors of node 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.
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(nodes) Remove multiple nodes.
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.
to_directed() Return a directed representation of the graph.
to_undirected() Return an undirected copy of the graph.

Attributes

name