summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* networkx-0.33networkx-0.33aric2006-11-281-2/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40482
* include tests and docs in source distributionaric2006-11-283-1/+22
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40481
* new newsaric2006-11-271-0/+32
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40480
* some tests should be skipped if no numpy, scipy, yamlaric2006-11-273-16/+29
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40479
* Update write_dot examplearic2006-11-221-13/+5
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40478
* trac test, fixes #77.aric2006-11-221-1/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40477
* test of trac upgrade, fixes #77aric2006-11-221-1/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40476
* test update to trac/svnaric2006-11-221-1/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40475
* Upgrade edge_boundary and node_boundary methods of Graph.dschult2006-11-214-93/+44
| | | | | | | | | | | The code is cleaner and no longer checks for disjoint input sets. Docstring updated to reflect this "added feature". Should be much faster to find Cheeger values now. These work for DiGraph, XGraph, XDiGraph as well for what it is worth. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40474
* removed dna... May it rest in peace.dschult2006-11-219-79/+12
| | | | | | | | | | | | Operators did try to use it, but the docstring contradicted what was actually done. For node_labels the docstring said the new labels were stored in self.node_labels while the code/tests looked for it in self.dna['node_labels']. I changed the code to match the docstring. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40473
* Updated docs for XGraph class to include list of inherited methodsdschult2006-11-211-63/+34
| | | | | | | | Removed methods that were the same as the inherited code. Minor docstring changes in wording may result--but not in meaning. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40472
* graph.py: changed __getitem__ to call neighbors_iterdschult2006-11-213-45/+5
| | | | | | | | | | | | | It might be marginally slower, but simplifies inheritance considerably. digraph.py: removed rewrite of __getitem__ no longer needed. xdigraph.py: removed code that is the same as digraph.py Some comments are thus changed in wording but not meaning. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40471
* Replace degree() with degree_iter() inside number_of_edges.dschult2006-11-212-3/+2
| | | | | | | Minor change to digraph docs. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40470
* more editing of info.py for clarityaric2006-11-211-26/+12
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40469
* Wordsmith the new info.py file. There are stilldschult2006-11-211-52/+52
| | | | | | | | | multiple sections that introduce XGraph and XDiGraph. I didn't attempt to combine them. Not sure if it would be better combined or left separate. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40468
* rename shortest_path.py to path.py to avoid shadowing function of same namearic2006-11-217-6/+6
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40467
* adjust imports in tests to reflect refactoring of base.py and xbase.pyaric2006-11-215-19/+5
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40466
* normalize documentation between graph classes and put in info.pyaric2006-11-218-713/+270
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40465
* use import digraph instead of import basearic2006-11-211-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40464
* change imports to use graph and digraph instead of basearic2006-11-211-1/+3
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40463
* Refactor large modules into smaller pieces:aric2006-11-2114-1276/+1817
| | | | | | | | | | networkx/base.py -> networkx/graph.py, networkx/digraph.py, networkx/exception.py, networkx/function.py networkx/xbase.py -> networkx/xgraph.py, networkx/xdigraph.py --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40462
* Bugfix updates for examples.aric2006-11-214-15/+16
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40461
* Add error handling for invalid position data arrays when drawing.aric2006-11-211-18/+24
| | | | | | | Fixes #74. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40460
* Added XDiGraph methods in_degree_iter, out_degree_iter and removeddschult2006-11-192-78/+61
| | | | | | | | | | | | degree method so it is inherited from DiGraph. Changed docstring of degree_iter for DiGraph and XDiGraph to be accurate. Addresses #75. Addresses #76. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40456
* Changed code for degree method (and friends in_degree/out_degree)dschult2006-11-186-141/+79
| | | | | | | | | | | | | | | | | so that they call degree_iter and friends. This allows the new result that the order of the degree values sent back in a list is the same as the order of the nodes in nbunch. see ticket 75. Added tests using a simple 3-node case when the order is not the same using dict.values(). This is not finished work however because XDiGraph doesn't have degree_iter (and iter friends). I think that means that XDiGraph's degree_iter has been broken all along. That was more than I wanted to mess with tonight. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40455
* refactor paths.py intoaric2006-11-1111-421/+565
| | | | | | | | | | | | | | | | - component.py : connected components etc. - distance.py : diameter, radius, eccentricity - shortest_path.py : bfs, dfs, dijkstra, floyd, etc. - dag.py: topological sort, is_directed_acyclic... side effects in M networkx/__init__.py M networkx/tree.py M networkx/centrality.py --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40451
* remove weight_matrix from import listaric2006-11-102-7/+2
| | | | | | | clean up threshold test imports --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40450
* spurious "weighted" keyword in adj_matrixaric2006-11-101-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40449
* Remove weight_matrix in favor of plain adj_matrixaric2006-11-102-16/+2
| | | | | | | | | | | | | | | I am following when I can Sedgewick's book on graph algorithms that adjacency matrix is for both weighted and unweighted graphs. Using numpy it is very easy to make a 0|1 adjacency matrix out of a 1|weight adjacency matrix e.g. >>> A=adj_matrix(X) # X is a weighted XGraph >>> B=numpy.where(A,0,1) --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40448
* optional edge_data in to_dict_of_dicts to allow arbitraryaric2006-11-101-5/+9
| | | | | | | | specification dictionary value (e.g. use edge_data=1 to make an adjacency matrix type representation). --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40447
* Adjust tests/tree.txt to work with new error message for addingaric2006-11-101-5/+5
| | | | | | | single node to tree --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40446
* remove add_edgesaric2006-11-101-13/+0
| | | | | | | | | | | | | | | | | | | Some reasons for removing: - I think there could be confusion between add_edge and add_edges if we keep it. - >>> for v in nodelist: G.add_edge(u,v) is pretty simple to write Some reasons against: - G.add_edges_from(zip([u]*len(nodelist),nodelist)) is not that simple to write --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40445
* Remove union code in base.py - union exists in networkx/operators.pyaric2006-11-101-30/+0
| | | | | | | | It might be advantageous to have union be a method of the graph classes instead of a separate function though. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40444
* Distinguish between adjacency matrices and weight matrices.jeff2006-11-103-5/+19
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40443
* to_dict_of_dicts() probably should assign values of 1 rather than Nonejeff2006-11-101-4/+7
| | | | | | | | | | | if the graph is unweighted. In addition, add flag to request weights or not. (I.e., do we want the adjacency matrix or the weight matrix in sparse form.) Default is the old behavior of providing the weight matrix. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40442
* Hopefully improve an error message.jeff2006-11-102-2/+65
| | | | | | | | Add support for union of two graphs (and so adding subtrees to trees). Add add_edges method. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40441
* update Quick_ref and Readme for numpy instead of Numeric usagearic2006-11-102-6/+5
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40440
* remove Numeric import option in favor of numpyaric2006-11-101-5/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40439
* remove Numeric imports from layout.py in favor of numpyaric2006-11-102-8/+3
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40438
* remove Numeric import from tests: must use numpyaric2006-11-101-8/+5
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40437
* deprecate numeric from spectrum.pyaric2006-11-102-50/+35
| | | | | | | | laplacian routines now return numpy matrix add laplacian_spectrum() and adjacency_spectrum() --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40436
* deprecate Numeric from utils.pyaric2006-11-101-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40435
* remove unnecessary import of numpy/Numericaric2006-11-101-9/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40434
* New floyd_warshall all pairs shortest path.aric2006-11-102-60/+61
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40433
* import tests so you canaric2006-11-101-1/+1
| | | | | | | | >>> import networkx >>> networkx.test() --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40432
* raise error for Graph/XGraph on get_edge for nonexistent edgearic2006-11-101-3/+4
| | | | | | | to match XGraph/XDiGraph --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40431
* M base.py: Add a get_edge method for Graph/XGraph that returns 1 if an edgearic2006-11-092-10/+11
| | | | | | | | | exists or 0 otherwise. Should also help simplify shortest path functions. M convert.py: Simplify to_dict_of_dicts with get_edge --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40430
* Add ability to color edges with a scalar field and colormap with pylabaric2006-11-092-4/+54
| | | | | | | | | | | | | | | M networkx/drawing/nx_pylab.py Uses new ScalarMapable LineCollection only available in matplotlib >=0.87.7 Example of use AM doc/examples/draw_edge_colormap.py Addresses #73. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40429
* adj_matrix now has option to return the weight matrixjeff2006-11-021-5/+15
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40427
* typo in register linkaric2006-11-011-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40426