-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
127 lines (94 loc) · 3.07 KB
/
__init__.py
File metadata and controls
127 lines (94 loc) · 3.07 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
"""
NetworkX
========
NetworkX is a Python package for the creation, manipulation,
and study of the structure, dynamics, and functions
of complex networks.
Website (including documentation)::
http://networkx.github.io
Mailing list::
https://groups.google.com/forum/#!forum/networkx-discuss
Source::
https://github.com/networkx/networkx
Bug reports::
https://github.com/networkx/networkx/issues
Simple example
--------------
Find the shortest path between two nodes in an undirected graph::
>>> import networkx as nx
>>> G = nx.Graph()
>>> G.add_edge('A', 'B', weight=4)
>>> G.add_edge('B', 'D', weight=2)
>>> G.add_edge('A', 'C', weight=3)
>>> G.add_edge('C', 'D', weight=4)
>>> nx.shortest_path(G, 'A', 'D', weight='weight')
['A', 'B', 'D']
Bugs
----
Please report any bugs that you find `here <https://github.com/networkx/networkx/issues>`_.
Or, even better, fork the repository on GitHub and create a pull request (PR).
License
-------
Released under the 3-Clause BSD license::
Copyright (C) 2004-2019 NetworkX Developers
Aric Hagberg <hagberg@lanl.gov>
Dan Schult <dschult@colgate.edu>
Pieter Swart <swart@lanl.gov>
"""
# Copyright (C) 2004-2019 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Add platform dependent shared library path to sys.path
#
import sys
if sys.version_info[:2] < (3, 5):
m = "Python 3.5 or later is required for NetworkX (%d.%d detected)."
raise ImportError(m % sys.version_info[:2])
del sys
# Release data
from networkx import release
__author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
(release.authors['Hagberg'] + release.authors['Schult'] +
release.authors['Swart'])
__license__ = release.license
__date__ = release.date
__version__ = release.version
__bibtex__ = """@inproceedings{hagberg-2008-exploring,
author = {Aric A. Hagberg and Daniel A. Schult and Pieter J. Swart},
title = {Exploring network structure, dynamics, and function using {NetworkX}},
year = {2008},
month = Aug,
urlpdf = {http://math.lanl.gov/~hagberg/Papers/hagberg-2008-exploring.pdf},
booktitle = {Proceedings of the 7th Python in Science Conference (SciPy2008)},
editors = {G\"{a}el Varoquaux, Travis Vaught, and Jarrod Millman},
address = {Pasadena, CA USA},
pages = {11--15}
}"""
# These are import orderwise
from networkx.exception import *
import networkx.utils
import networkx.classes.filters
import networkx.classes
from networkx.classes import *
import networkx.convert
from networkx.convert import *
import networkx.convert_matrix
from networkx.convert_matrix import *
import networkx.relabel
from networkx.relabel import *
import networkx.generators
from networkx.generators import *
import networkx.readwrite
from networkx.readwrite import *
# Need to test with SciPy, when available
import networkx.algorithms
from networkx.algorithms import *
import networkx.linalg
from networkx.linalg import *
from networkx.testing.test import run as test
import networkx.drawing
from networkx.drawing import *