CoCalc Public Filestmp / 2016-02-15-095954.sagewsOpen in with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
import networkx
help(networkx)
Help on package networkx: NAME networkx FILE /projects/sage/sage-6.10/local/lib/python2.7/site-packages/networkx-1.10-py2.7.egg/networkx/__init__.py DESCRIPTION NetworkX ======== NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. https://networkx.lanl.gov/ Using ----- Just write in Python >>> import networkx as nx >>> G=nx.Graph() >>> G.add_edge(1,2) >>> G.add_node(42) >>> print(sorted(G.nodes())) [1, 2, 42] >>> print(sorted(G.edges())) [(1, 2)] PACKAGE CONTENTS algorithms (package) classes (package) convert convert_matrix drawing (package) exception external (package) generators (package) linalg (package) readwrite (package) relabel release testing (package) tests (package) utils (package) version SUBMODULES adjlist algebraicconnectivity all assortativity astar attracting attrmatrix betweenness betweenness_subset biconnected binary bipartite block boundary breadth_first_search centrality chordal chordal_alg classic clique closeness cluster coloring communicability_alg community components connected connectivity core correlation current_flow_betweenness current_flow_betweenness_subset current_flow_closeness cycles dag degree_alg degree_seq dense depth_first_search digraph directed distance_measures distance_regular dominance dominating edgedfs edgelist ego eigenvector euler expanders flow flow_matrix function generic geometric gexf gml gpickle graph graph6 graphical graphmatrix graphml harmonic hierarchy hits_alg hybrid isolate isomorphism katz kclique laplacianmatrix layout leda line link_analysis link_prediction load matching minors mis mixing modularitymatrix mst multidigraph multigraph multiline_adjlist neighbor_degree nx_agraph nx_pydot nx_pylab nx_shp nx_yaml operators ordered pagerank_alg pairs pajek product random_clustered random_graphs richclub semiconnected shortest_paths simple_paths small smetric social sparse6 spectrum stochastic strongly_connected swap threshold traversal tree triads unary unweighted vitality weakly_connected weighted DATA __author__ = 'Aric Hagberg <[email protected]>\nDan Schult <[email protected] __bibtex__ = '@inproceedings{hagberg-2008-exploring,\nauthor = ...\nad... __date__ = 'Sun Aug 2 08:17:36 2015' __license__ = 'BSD' __version__ = '1.10' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0... VERSION 1.10 DATE Sun Aug 2 08:17:36 2015 AUTHOR Aric Hagberg <[email protected]> Dan Schult <[email protected]> Pieter Swart <[email protected]>