blob: f82c8fa553838623e2805e54c864ab001ad77ec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
.. _graph:
==========================================
Graph -- Undirected graphs with self loops
==========================================
Overview
========
.. currentmodule:: networkx
.. autofunction:: Graph
=======
Methods
=======
Adding and removing nodes and edges
===================================
.. autosummary::
:toctree: generated/
Graph.__init__
Graph.add_node
Graph.add_nodes_from
Graph.remove_node
Graph.remove_nodes_from
Graph.add_edge
Graph.add_edges_from
Graph.add_weighted_edges_from
Graph.remove_edge
Graph.remove_edges_from
Graph.add_star
Graph.add_path
Graph.add_cycle
Graph.clear
Iterating over nodes and edges
==============================
.. autosummary::
:toctree: generated/
Graph.nodes
Graph.__iter__
Graph.edges
Graph.get_edge_data
Graph.neighbors
Graph.__getitem__
Graph.adjacency
Graph.nbunch_iter
Information about graph structure
=================================
.. autosummary::
:toctree: generated/
Graph.has_node
Graph.__contains__
Graph.has_edge
Graph.order
Graph.number_of_nodes
Graph.__len__
Graph.degree
Graph.size
Graph.number_of_edges
Graph.nodes_with_selfloops
Graph.selfloop_edges
Graph.number_of_selfloops
Making copies and subgraphs
===========================
.. autosummary::
:toctree: generated/
Graph.copy
Graph.to_undirected
Graph.to_directed
Graph.subgraph
|