Statistics
| Branch: | Revision:

iof-tools / networkxMiCe / networkx-master / networkx / __init__.py @ 5cef0f13

History | View | Annotate | Download (3.1 KB)

1
"""
2
NetworkX
3
========
4

5
NetworkX is a Python package for the creation, manipulation,
6
and study of the structure, dynamics, and functions
7
of complex networks.
8

9
Website (including documentation)::
10

11
    http://networkx.github.io
12

13
Mailing list::
14

15
    https://groups.google.com/forum/#!forum/networkx-discuss
16

17
Source::
18

19
    https://github.com/networkx/networkx
20

21
Bug reports::
22

23
    https://github.com/networkx/networkx/issues
24

25
Simple example
26
--------------
27

28
Find the shortest path between two nodes in an undirected graph::
29

30
    >>> import networkx as nx
31
    >>> G = nx.Graph()
32
    >>> G.add_edge('A', 'B', weight=4)
33
    >>> G.add_edge('B', 'D', weight=2)
34
    >>> G.add_edge('A', 'C', weight=3)
35
    >>> G.add_edge('C', 'D', weight=4)
36
    >>> nx.shortest_path(G, 'A', 'D', weight='weight')
37
    ['A', 'B', 'D']
38

39
Bugs
40
----
41

42
Please report any bugs that you find `here <https://github.com/networkx/networkx/issues>`_.
43
Or, even better, fork the repository on GitHub and create a pull request (PR).
44

45
License
46
-------
47

48
Released under the 3-Clause BSD license::
49

50
   Copyright (C) 2004-2019 NetworkX Developers
51
   Aric Hagberg <hagberg@lanl.gov>
52
   Dan Schult <dschult@colgate.edu>
53
   Pieter Swart <swart@lanl.gov>
54
"""
55
#    Copyright (C) 2004-2019 by
56
#    Aric Hagberg <hagberg@lanl.gov>
57
#    Dan Schult <dschult@colgate.edu>
58
#    Pieter Swart <swart@lanl.gov>
59
#    All rights reserved.
60
#    BSD license.
61
#
62
# Add platform dependent shared library path to sys.path
63
#
64

    
65
from __future__ import absolute_import
66

    
67
import sys
68
if sys.version_info[:2] < (3, 5):
69
    m = "Python 3.5 or later is required for NetworkX (%d.%d detected)."
70
    raise ImportError(m % sys.version_info[:2])
71
del sys
72

    
73
# Release data
74
from networkx import release
75

    
76
__author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
77
    (release.authors['Hagberg'] + release.authors['Schult'] +
78
        release.authors['Swart'])
79
__license__ = release.license
80

    
81
__date__ = release.date
82
__version__ = release.version
83

    
84
__bibtex__ = """@inproceedings{hagberg-2008-exploring,
85
author = {Aric A. Hagberg and Daniel A. Schult and Pieter J. Swart},
86
title = {Exploring network structure, dynamics, and function using {NetworkX}},
87
year = {2008},
88
month = Aug,
89
urlpdf = {http://math.lanl.gov/~hagberg/Papers/hagberg-2008-exploring.pdf},
90
booktitle = {Proceedings of the 7th Python in Science Conference (SciPy2008)},
91
editors = {G\"{a}el Varoquaux, Travis Vaught, and Jarrod Millman},
92
address = {Pasadena, CA USA},
93
pages = {11--15}
94
}"""
95

    
96
# These are import orderwise
97
from networkx.exception import *
98
import networkx.utils
99

    
100
import networkx.classes.filters
101
import networkx.classes
102
from networkx.classes import *
103

    
104
import networkx.convert
105
from networkx.convert import *
106

    
107
import networkx.convert_matrix
108
from networkx.convert_matrix import *
109

    
110

    
111
import networkx.relabel
112
from networkx.relabel import *
113

    
114
import networkx.generators
115
from networkx.generators import *
116

    
117
import networkx.readwrite
118
from networkx.readwrite import *
119

    
120
# Need to test with SciPy, when available
121
import networkx.algorithms
122
from networkx.algorithms import *
123
import networkx.linalg
124

    
125
from networkx.linalg import *
126
from networkx.tests.test import run as test
127

    
128
import networkx.drawing
129
from networkx.drawing import *