| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint and fix using ruff
* add flake8-pie lints
* remove useless import alias
* bump version
* bump deps
---------
Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #6036
* test load centrality
* test dispersion
* test dispersion
* dispersion test
* test dispersion
* bug-fixes-for-issue-6088
* deleted
* bug-fix-for-issue-6092
* bugfix-for-issue-6088
* bugfix-for-issue-6088
* bugfix-for-issue-6088
* bugfix-issue-6088
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Fixed the issue that the wrong dict factory on a MultiDiGraph was used for edge attributes (edge_key_dict_factory instead of edge_attr_dict_factory)
Extended tests to typecheck the dict factories and added a test that incorporates custom dict factories on a MultiDiGraph
* Mypy ignore inferred types in MDG subclass.
Co-authored-by: Fabian Ball <fabian@codagio.de>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add minimal mypy configuration file.
* Add mypy workflow to GH.
* Properly import sentinels from traversal.edgedfs.
* mypy doesn't like variables named \"e\".
* Rm annotations from single function.
* Fix name collisions in test suite.
Make sure all tests have unique names.
* Rm unused random seed in test setup.
* Rm redundant __all__ specification.
* Silence mypy error from sum(). Mypy bug?
* Fix tsp test instantiation nit.
* \"type: ignore\" to suppress conditional fn sigature errors.
* Remaining \"type: ignore\" to appease mypy.
* Configure mypy to ignore inheritance issues.
* Update exclude conf for CI.
- Add yaml
- Reformat regex containing reportviews
* Rm partial annotations from lukes.py.
Fixes mypy errors due to unannotated code.
* Reorg defaultdict to reduce type: ignore cruft.
* Homogenize signatures for fns defined in conditionals.
* err as varname only in exception catching.
* Fix name collision in Bellman-Ford test suite.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add greedy algorithm for solving TSP
Many problems of Combinational Optimization can be represented as
graphs.
These problems have enormous significance in many aspects of science,
but there are not any algorithms to solve some of them in polynomial
time.
However many, heuristic and metaheuristic algorithms have been published
over the past years in order to solve / approximate the solutions to
these problems.
The purpose of this commit is to add implementation of such algorithms
for solve one of the most famous problems of Combinational
Optimizations, Travelling Salesman Problem (TSP). A greedy algorithm has
been implemented at the moment for this reason.
"applications" package has been created which include modules that
represent a problem.
Each module contains several algorithms for solving the specific
problem.
At this commit, tsp.py module is added which contains greedy_tsp()
function; a implementation of a greedy algorithm.
* Fix example error
* Trivial changes
List of changes:
Removal of unnesecary _is_weighted() function
Improvements on documentation
* Add applications package to setup.py file
* Change output of greedy algorithm
Algorithm's output is a list of nodes now
* Add simulated annealing algorithm
Add a metaheuristic local search algorithm for solving TSP
* Minor changes
* Fix example doc errors
* Compatible with python 3
* Move tsp module to algorithms package
* Code improvements
* Handle small graphs and fix doc examples
* Documentation changes and rename variables
* Adds Threshold Accepting algorithm for TSP
* Implemented maximal matching of minimal weight and created test suite.
* Removed useless print
* Implemented Christofides.
* Coding was missing
* Add more general traveling_salesman_problem using christofides
Also reconfigure import structure and remove min_weight_matching from
module since it is now in matching.py
* Add new functions to the docs and minor typos
* pep8 fixes
* fix pep8 and change .gitignore
* Add tests of the approximation namespace
update docs in approximation/__init__.py
* Fix is_matching to check if edges in G. Other tweaks:
doc changes
and put not_implemented_for on find_matching functions
* Improve is_matching selfloop handling and expand tests
* Move tsp to approximation directory. Apply black.
* Move tsp tests to approximation tests folder
* Attempt to bring tsp up to current code.
* commit pep8 that my black didnt change, but pep8speaks did find. ??
* tweak a few things and run black
* combine #4083 and #3585 into traveling_salesman.py
* Match chistofides output to other tsp functions
and adjust calling syntax of tests
tweak docs
tweak see also section
* Put big-O complexity in in-line math env.
Prevents sphinx from trying to do variable substitution between
pipes.
* Minor touchups to christofides docstring.
* RST touchups to tsp module docstring.
* Rm extra string from tsp module.
* Docstring touchups for traveling_salesman_problem.
* rst fixups for greedy_tsp docstring.
* rst formatting for simulated annealing docstring.
* More math in-lining for simulated annealing docstring.
* rst and minor grammatical fixes to TA docstring.
* Fix path-finding and test all methods for tsp function
* the refactoring was incomplete. Now maybe is
- Add tests of TSP with all methods.
- Refactor tests to match simulated_annealing tests and threshold tests.
- Unify treatment of weight so unweighted edges use default weight 1.
weight now defaults to "weight" with a default value of 1.
- Rename tolerance to max_iterations (tolerance is used for error bound)
- Rename iterations to N_inner (each iteration takes this many inner loops)
- Introduce idioms like `pairwise` and `cycle.copy()` (over cycle[:])
- Allow passthrough of method kwargs for traveling_salesman_problem
Still need to:
- add test of case where path is more than one edge less that cycle
(incomplete_graph)
- require cycle input (maybe make default list(G)??)
- consider the complexity claims in the doc_strings
* More api changes to TSP functions
- `chritofides` now allows (and ignores) selfloops
- `move` can be a function as well as "1-1" and "1-0"
- `method` for traveling_salesman_problem must have 2 arguments
instead of passing kwargs. User must "curry" to set parameters
- changed doc_string typos in matching.py
* Add test to check that cycle=False can remove many edges
* Change init_cycle api to require input from user
The idea is to make the user specify the initial cycle to start from
rather than relying on the programmers default of a greedy algorithm.
To easy usage, I check for a string "greedy" as a shortcut.
* Update docs with more correct complexity info.
* Check for complete graph now more efficient and selfloops ignored
* merge is_matching changes
* New Networkx changes
* Stub for Asadpour. Needed to create GSoC PR
* Update to integrate changes from main
* Added function stubs and draft docstrings for the Asadpour algorithm
* Skeleton classes and methods for tree iterators
* Attempting to set up basic tests for MST of a partition
* testing
* I'm not entirly sure how the commit hook works...
* Moved iterators into the correct files to maintain proper codebase visibility
* Including Black reformat
* Revert "Merge branch 'networkx:main' into main"
This reverts commit 0616a2331adfcc02976d305937aa52272ed48266, reversing
changes made to 1ea769371f54c4c6f9a51f860caf4a60aef7d094.
* Trying to merge again
* Attempting to merge (4)
* Now passes all tests except test_namespace_alias in /tests/test_import.py
* Everything should FINALLY pass (I wipped my networkx dir and re-download from upstream)
* reinstall the pre-commit hook
* Grabbing black reformats
* Working on debugging ascent method plus black reformats
* Ascent method terminating, but at non-optimal solution
* minor edits
* Fixed termination condition, still given non-optimal result
* Minor bugfix, still non-optimal result
* Fixed subtle bug in find_epsilon()
* Cleaned code and tried something which didn't work
* Modified the ArborescenceIterator to accept init partition
* Black formats
* Branch and bound returning optimal solution
* Working Ascent method, code needs cleaning
* black formatting changes
* Performance tweaks and testing fractional answers
* Fixed test bug, I hope
* Asadpour output for ascent method
* Fixed numpy imports crashing pypi tests
* Removed branch and bound method. One unit test misbehaving
* Added asymmetric fractional test for the ascent method
* Removed printn statements and tweaked final test to be more asymmetric
* Draft of spanning_tree_distribution
* Black changes
* Changed HK to only report on the support of the answer
* Fixed contraction bug by changing to MultiGraph. Problem with prob > 1
* Black reformats
* Fixed pypi test error
* Further testing of dist fix
* Can sample spanning trees
* Developing test for sampling spanning tree
* Changed sample_spanning_tree test to Chi squared test
* Tweaked signifiance level
* Found true minimum sample size
* fixed typo
* untested implementation of asadpour_tsp
* Fixed issue reading flow_dict
* Fixed runtime errors in asadpour_tsp
* black reformats
* Adding test cases
* documentation update
* Fixed rounding error with tests
* One new test and check
* Documentation update for the iterators
* Attempting to fix class documentation
* Pull out the style changes into a separate branch
* fix mixed history
* more
Co-authored-by: Thodoris Sotiropoulos <theosotr@windowslive.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: mjschwenne <mjschwenne@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add special processing of `multigraph_input` upon graph init
Fixes: #4720
Adding a keyword argument `multigraph_input=True`
to a graph construction call should treat any incoming input data for
the graph as a dict-of-dict-of-dict multigraph data structure.
Previously the multigraph_input argument would be added to the graph
attribute dict and ignored when processing the input data.
* Change default and add tests
* make default try mgi=True, and if fails try mgi=False
* copy parameter docstring to main class
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor testing utilities
Change `assert_edges_equal`, `assert_graphs_equal`, and `assert_nodes_equal`
to be more pytest-idiomatic.
For example, `assert_edges_equal` becomes the Boolean function `edges_equal`
and then the assert is done the testing file
(i.e., `assert edges_equal(edges1, edges2)`).
This also makes these utility functions useful in nontesting situations
where you want to compare edges, but not raise an exception based on the result.
* Move testing utility functions
* Use new testing utilities
* Deprecate assert_*_equal testing utilities
* Document node, edge, and graph equality helper functions
* text nits.
* Update networkx/tests/test_convert_pandas.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/readwrite/tests/test_sparse6.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/readwrite/tests/test_graph6.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/generators/tests/test_classic.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/tree/tests/test_operations.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/tree/tests/test_coding.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/tests/test_dag.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/minors/tests/test_contraction.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* add short equality description to docstring
* Suppress known warnings
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| |
|
|
| |
find networkx -name \*.py -exec pyupgrade --py36-plus {} \;
|
| | |
|
| |
|
|
|
|
|
|
| |
* change name of imported test objects to avoid dups
* Use a better name to hide unwanted tests
* remove some blank lines
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
I didn't change functions defined in tests.
I also left drawing routines as is at least for now.
Addresses #1582
Fixes #1583
|
| |
|
|
|
|
|
|
|
|
| |
* move selfloop methods out of graph classes into function.py
* replace G.node with G.nodes. fix Pickle of views
* Replace G.edge with G.edges
* Add a few lines of docs for release realted to this PR.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update code to prepare for melding graphviews
* Meld graphviews into graph classes
* Cleanup subgraph calling sign. and remove duplicate code
* Add some tests for raising exceptions
* update edge_kcomponents to avoid readonly views.
* Add root_graph attribute and tests
Update tests for root_graph as well as fresh_copy.
I left fresh_copy as an attribute even with root_graph
because a view might switch the data structure of the
view from directed to undirected. Going to the root_graph.__class__
may not give you what you need to create a graph like the view.
Fresh_copy gives a null graph with the directed/multi type of that
view or graph.
|
| |
|
|
|
| |
Can now do (u, v, d) or (u, v, k) with k used only when dict.update(d)
raises an exception. Basically if d is a dict or iterator of 2-tuples
assume it is edge data. Otherwise assume it is a key.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add minimal docstrings
* Add note about ordered graph variants
* Mention ordered variant in `See Also` section
* Comply with pep8
* Replace reference to LogGraph with PrintGraph
LogGraph was a reference to a graph that logged each mutation.
That's what PrintGraph does and is provided in the examples directory.
* Do not claim OrderedGraphs maintain the order of adding edges
* Remove OrderedGraph examples and minor cleanup for Sphinx
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#2475)
* Dont assume iterators for nodes/edges/degrees (prep for views)
* Add graph view classes for nodes/edges/degree
* Add right set operations (not present in python3.3 KeysView
* Add nodes before adding edges so python36 tests work
By only adding edges, the nodes were added in order (0,1,3,2)
and with the ordered nature of python3.6 dicts the tests failed.
Could also fix by using nodelist on each call to to_convert_...
* weighted graph convert tests testing empty graphs
The edge iterator was exhausted for source before being used for dest
* allow DegreeView to include case of nbunch
* Make node/edge/degree properties of Graph
* View contains fix and Viewers can return self. More tests
* Add more tests including one for #2347
* Add nbunch tests and pep8
* Rename to EdgeView and EdgeDataView
* docs tweaks and pep8
* fix up nodeDataView contains. Add and clean up tests.
* Change the graph attributes to read-only properties
* Reframe views code and extend _node to all networkx (still need
examples)
* Clean up and pep8 for view changes
* ername AtlasViews, simplify code and add docstrings
* Make G[u] return a view, and catch some doc bugs
* Update views to use _node,_adj. Add len to EdgeDataView
* minor adjustments to example subclass/printgraph
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Dont assume iterators for nodes/edges/degrees (prep for views)
* Add graph view classes for nodes/edges/degree
* Add right set operations (not present in python3.3 KeysView
* Add nodes before adding edges so python36 tests work
By only adding edges, the nodes were added in order (0,1,3,2)
and with the ordered nature of python3.6 dicts the tests failed.
Could also fix by using nodelist on each call to to_convert_...
* weighted graph convert tests testing empty graphs
The edge iterator was exhausted for source before being used for dest
* allow DegreeView to include case of nbunch
* Make node/edge/degree properties of Graph
* View contains fix and Viewers can return self. More tests
* Add more tests including one for #2347
* Add nbunch tests and pep8
* Rename to EdgeView and EdgeDataView
* docs tweaks and pep8
* fix up nodeDataView contains. Add and clean up tests.
* Tweaks to improve speed for nodes and edges.
* improve views dependence on ABCs, remove len from dataviews
* First pass on docs in views.py
* Change property to lazy attribute
|
| | |
|
| | |
|
| |
|
|
|
| |
This adds the ability to get an edge-induced subgraph for graphs,
digraphs, multigraphs, and multidigraphs.
|
| |\
| |
| | |
Update adjacency_iter() method to adjacency() and remove adjacency_list()
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
| |
Previously `Graph.nodes()` returned a list of nodes and
`Graph.nodes_iter()` returned an iterator over nodes. With this commit,
the former function now returns an iterator and the latter no longer
exists.
|
| |
|
|
| |
Fixes #736
|
| | |
|
| |
|
|
|
| |
This helps trying out different data structures.
Addresses #206, #457, #608
|
| | |
|
| |
|
|
|
|
|
|
|
| |
but still point to attr from the original graph.
Remove copy keyword argument because in_place subgraph
can be done using remove_nodes_from. Update tests accordingly
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401543
|
| |
|
|
|
|
|
| |
Addresses #284
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401482
|
| |
|
|
|
|
|
|
| |
Fixed bug in remove_edges_from when a selfloop edge is removed.
Added tests for removing selfloop edges.
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401376
|
| |
|
|
|
| |
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401364
|
| |
|
|
|
| |
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401162
|
| |
|
|
|
|
|
|
| |
edges are removed (the last two) when only one should
be removed. Add tests for this case. Fixes #217.
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401118
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a default if no edge is found.
Change function of has_edge() to take two aguments (nodes).
It has exactly the same behavior now as has_neighbor()
Addresses #203
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401099
|
| |
|
|
|
|
|
| |
Gives NetworkXError if tuples can't be unpacked correctly.
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401071
|
|
|
svnmerge from
https://networkx.lanl.gov/svn/networkx/branches/pre99
........
r741 | aric | 2008-02-18 18:29:21 -0700 (Mon, 18 Feb 2008) | 3 lines
pre99 branch refactoring directory layout
........
r742 | aric | 2008-02-18 18:30:17 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: missing utils.py
........
r743 | aric | 2008-02-18 20:42:25 -0700 (Mon, 18 Feb 2008) | 7 lines
pre99: graph,digraph,multigraph,multidigraph
list functions in __init__
remove xgraph,xdigraph
........
r744 | aric | 2008-02-18 20:42:58 -0700 (Mon, 18 Feb 2008) | 3 lines
pre99: example of labeled graphs
........
r745 | aric | 2008-02-18 20:44:46 -0700 (Mon, 18 Feb 2008) | 5 lines
pre99: tests for graph,digraph,multigraph,multidigraph
uses nose - run with nosetests
........
r746 | aric | 2008-02-18 20:45:23 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: __init__ for classes
........
r747 | aric | 2008-02-18 20:47:51 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: multigraph and multidigraph
........
r748 | aric | 2008-02-18 20:48:37 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: move operator -> operators
........
r749 | aric | 2008-02-18 20:49:38 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: add _all__ and fix complete graph to work with selfloops on
........
r750 | aric | 2008-02-18 20:50:19 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: update utils header
........
r751 | aric | 2008-02-18 21:02:25 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: use __all__ and G.is_directed() -> G.directed
........
r752 | aric | 2008-02-18 21:03:33 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: linalg uses __all__
........
r753 | aric | 2008-02-18 21:38:34 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99 : define __all__ and use for imports in __init__
........
r754 | aric | 2008-02-18 21:51:29 -0700 (Mon, 18 Feb 2008) | 2 lines
pre99: adjust imports in isomorph.py
........
r755 | aric | 2008-02-18 21:52:37 -0700 (Mon, 18 Feb 2008) | 3 lines
pre99: An old doctest test, modified.
........
r756 | aric | 2008-02-19 07:03:31 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: fix imports in generators
........
r757 | aric | 2008-02-19 18:51:15 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: NEP2 version of convert.py
........
r758 | aric | 2008-02-19 18:52:07 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: adjust imports in isomorph.py
........
r759 | aric | 2008-02-19 18:52:50 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: add DiGraphMatcher to imports
........
r760 | aric | 2008-02-19 18:53:22 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: add digraph edges_iter()
........
r761 | aric | 2008-02-19 18:54:52 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: tests for digraph edges_iter
........
r762 | aric | 2008-02-19 18:55:36 -0700 (Tue, 19 Feb 2008) | 2 lines
pre99: add (modified) legacy digraph doctests
........
r763 | dschult | 2008-02-23 15:15:11 -0700 (Sat, 23 Feb 2008) | 3 lines
pre99: Update convert.py and convert.txt to pre99 API from NEP2 style.
........
r764 | dschult | 2008-02-23 17:28:59 -0700 (Sat, 23 Feb 2008) | 3 lines
pre99: Fix up the other (scipy and numpy) tests for convert.py
........
r765 | dschult | 2008-02-23 17:46:51 -0700 (Sat, 23 Feb 2008) | 3 lines
pre99: Revision of info.py to reflect pre99 API.
........
r766 | dschult | 2008-02-23 21:37:13 -0700 (Sat, 23 Feb 2008) | 12 lines
pre99: a few minor code tweaks.
graph/digraph
- revamp adjaccency_list to give order of G.nodes() and not use _helper()
- remove extra code in degree_iter
- speedup in degree/in_degree/out_degree
- speedup in subgraph
multigraph/multidigraph
- get_edgedata->get_edge in multi(di)graph
........
r769 | dschult | 2008-03-02 21:41:54 -0700 (Sun, 02 Mar 2008) | 6 lines
pre99: cleanup classes
Change usage of "delete" in code and docs to "remove".
In MultiGraph/MulriDiGraph use super(...). instead of Graph. or DiGraph.
........
r770 | dschult | 2008-03-02 21:44:30 -0700 (Sun, 02 Mar 2008) | 6 lines
pre99: Simplify LabeledGraph code slightly using super(...)
LabeledDiGraph now only inherits. No new code. Should do similar for Multi versions.
But should they be in separate files, or all in one file?
........
r794 | dschult | 2008-07-11 16:58:43 -0600 (Fri, 11 Jul 2008) | 1 line
Changes in docstrings for graph.py
........
r795 | dschult | 2008-07-11 17:00:53 -0600 (Fri, 11 Jul 2008) | 3 lines
fix subgraph bug and add tests (mistakenly added last commit)
........
r796 | dschult | 2008-07-11 18:08:45 -0600 (Fri, 11 Jul 2008) | 8 lines
Fixed tests for prepare_nbunch and then had to fix code
because creating the iterator doesn't catch nonsequence errors
until iterator is used.
Added more tests for add_edges_from and some code to catch
errors in add_edges_from().
........
r797 | dschult | 2008-07-11 20:28:07 -0600 (Fri, 11 Jul 2008) | 3 lines
Add subgraph and tests for subgraph in digraph,multigraph and dimultigraph.
........
r799 | dschult | 2008-07-14 23:21:18 -0600 (Mon, 14 Jul 2008) | 12 lines
Create nbunch as set in subgraph in Graph and DiGraph.
Remove DiGraph docstrings that are identical to Graph
docstrings. Some DiGraph code changes to fix data in
add_edges_from and remove unnecessary checks for selfloops
in remove_node.
Add doc that to_undirected() isn't well-defined if edge
data in two directions isn't the same.
Tests update for removing nodes when selfloops present.
........
r804 | dschult | 2008-08-11 22:33:03 -0600 (Mon, 11 Aug 2008) | 6 lines
Added labeledgraph to imports, updated info graph and convert docstrings.
replaced list comprehension with iterator comprehension in graph.
Updated operators.py so that it at least works with the tests.
........
r805 | dschult | 2008-08-13 21:43:22 -0600 (Wed, 13 Aug 2008) | 3 lines
Update centrality for pre99 classes and update tests.
........
r806 | dschult | 2008-08-13 22:26:36 -0600 (Wed, 13 Aug 2008) | 3 lines
Update clique for pre99.
........
r807 | dschult | 2008-08-13 22:27:57 -0600 (Wed, 13 Aug 2008) | 1 line
Change name of cliques test file.
........
r808 | dschult | 2008-08-13 23:55:55 -0600 (Wed, 13 Aug 2008) | 4 lines
Updated core.py for pre99.
Rewrote much of cluster.py to reuse a single iterator/helper function.
........
r809 | dschult | 2008-08-14 00:52:04 -0600 (Thu, 14 Aug 2008) | 3 lines
Update traversal modules for pre99 along with tests.
........
r810 | dschult | 2008-08-14 01:08:02 -0600 (Thu, 14 Aug 2008) | 1 line
Updated isomorphism algorithms for pre99.
........
r811 | dschult | 2008-08-14 02:42:58 -0600 (Thu, 14 Aug 2008) | 1 line
Updated generators modules for pre99 to pass tests.
........
r812 | dschult | 2008-08-14 10:02:22 -0600 (Thu, 14 Aug 2008) | 4 lines
One bug fix and some tweaks in convert.
We probably need more tests here especially Graph to MultiDiGraph, etc..
........
r813 | dschult | 2008-08-14 10:42:59 -0600 (Thu, 14 Aug 2008) | 11 lines
Remove to_directed and to_undirected methods.
I spent too much time comparing DiGraph(G) to G.to_directed()
and even with lots of fiddling I couldn't get the methods
to be faster than the from_whatever.
As written, they are 2-3 times slower.
We wanted to get rid of them anyway and it looks like convert is ready for that.
I also adjusted LabeledGraph so that LabeledGraph(LG) copies the labels
as well as the graph.
........
r814 | dschult | 2008-08-14 12:14:55 -0600 (Thu, 14 Aug 2008) | 7 lines
Simplify the copy() method by using convert.
Have to change from_whatever() to copy the self.weighted attribute.
Decided not to have it copy the name too...
Too complicated and not sure that copying the name is the best/natural choice.
Users can copy it outside of from_whatever() if they want.
........
r815 | dschult | 2008-08-14 12:36:55 -0600 (Thu, 14 Aug 2008) | 7 lines
Changed the keyword for subgraph from copy=True to newgraph=True.
It used to be inplace=False. Copy has too many other meanings in this package.
Not sure that newgraph is the best though either. I'd prefer to take
out the option of making a subgraph by deleting nodes.
That's what delete_nodes_from is for.
........
r816 | dschult | 2008-08-14 13:26:40 -0600 (Thu, 14 Aug 2008) | 7 lines
Change from_whatever() to identify NetworkX
graphs using attribute 'adj' instead of 'add_node'.
This will allow future e.g. scipy sparse matrix classes
to use add_node without confusing from_whatever().
We really use thing.adj and not thing.add_node anyway.
........
r817 | aric | 2008-08-14 15:16:07 -0600 (Thu, 14 Aug 2008) | 2 lines
change dates of copyright in README
........
r818 | dschult | 2008-08-14 15:19:52 -0600 (Thu, 14 Aug 2008) | 1 line
Updated readwrite/adjlist.py to pre99.
........
r819 | dschult | 2008-08-14 22:32:30 -0600 (Thu, 14 Aug 2008) | 4 lines
Back out (inverse merge) changeset 815 where subgraph(copy=True) became subgraph(newgraph=True).
Following numpy.array we can use copy=True.
........
r820 | dschult | 2008-08-14 23:07:01 -0600 (Thu, 14 Aug 2008) | 3 lines
Docstring correction... subgraph(copy=False) is a mutating method.
........
r821 | dschult | 2008-08-14 23:11:57 -0600 (Thu, 14 Aug 2008) | 9 lines
Updated readwrite/edgelist for pre99
In the process realized that MultiDiGraph was
using digraph's methods for edges_iter and remove_edges_from.
(and shouldn't be)
Added some tests to help with spotting this particular hole.
How many others are there? :)
........
r822 | dschult | 2008-08-14 23:44:01 -0600 (Thu, 14 Aug 2008) | 3 lines
Update remaining readwrite modules for pre99.
........
r823 | dschult | 2008-08-15 13:44:41 -0600 (Fri, 15 Aug 2008) | 3 lines
Update linalg/spectrum.py to pre99. Actually only had to adjust the tests import statement.
........
r824 | dschult | 2008-08-15 15:07:06 -0600 (Fri, 15 Aug 2008) | 4 lines
Reinstall to_(un)directed for pre99... Useful because you don't
always know what type of graph you are converting to directed.
........
r825 | dschult | 2008-08-15 15:15:41 -0600 (Fri, 15 Aug 2008) | 4 lines
More cleanup of to_undirected for pre99....
Also its not clear what to do with multiedges. Both directions means two undirected?
........
r826 | dschult | 2008-08-15 15:58:27 -0600 (Fri, 15 Aug 2008) | 5 lines
Rename prepare_nbunch as nbunch_iter
Use nbunch_iter more effectively for edges()...
Now edges should be almost as fast as looking through all neighbors with adjacency_iter?
........
r827 | dschult | 2008-08-15 16:40:24 -0600 (Fri, 15 Aug 2008) | 4 lines
Update tree and drawing for pre99.
All modules now pass the tests.
........
r828 | dschult | 2008-08-15 23:28:04 -0600 (Fri, 15 Aug 2008) | 5 lines
Cleaning up documentation a little.
In the process, realised that multidigraph was missing get_edge
so put that in too.
........
r829 | dschult | 2008-08-16 00:27:03 -0600 (Sat, 16 Aug 2008) | 9 lines
Based on examples, fixed some stuff in convert.py and nx_agraph.
The examples haven't all been run. I did basic simple conversions
to pre99:
1) look for XGraph and XDiGraph and change to Graph/MultiGraph depending.
2) look for .edges() and check if it wants three values returned (add data=True)
3) look for is_directed
4) look for multiedges and loops to see if we handle them correctly.
........
r845 | dschult | 2008-08-23 15:36:31 -0600 (Sat, 23 Aug 2008) | 5 lines
Added utils to __all__ so from networkx import *;utils._get_fh() works.
Removed import networkx from utils to avoid circular imports--perhaps utils should be treated like other modules in __all__?
Small corrections for nx_agraph.py and examples/unixemail.py
........
r846 | dschult | 2008-08-23 20:31:37 -0600 (Sat, 23 Aug 2008) | 3 lines
Upate documentation docs for pre99.
........
r847 | dschult | 2008-08-23 22:02:14 -0600 (Sat, 23 Aug 2008) | 5 lines
Add methods add_path, add_cycle back into base class;
new method add_star.
Put edge_boundary and node_boundary into algorithms module called boundary.py
........
r848 | dschult | 2008-08-23 22:10:53 -0600 (Sat, 23 Aug 2008) | 3 lines
Put add_star() method into docs.
........
r858 | aric | 2008-10-21 21:19:31 -0600 (Tue, 21 Oct 2008) | 2 lines
pre99 docstring formatting
........
r859 | aric | 2008-10-21 21:25:40 -0600 (Tue, 21 Oct 2008) | 2 lines
pre99: beginning draft for sphinx-based documentation
........
r860 | aric | 2008-10-24 10:20:14 -0600 (Fri, 24 Oct 2008) | 3 lines
adjust docstrings to use nx prefix, will use nose plugin that
specifies "import networkx as nx" for testing
........
r861 | aric | 2008-10-24 10:38:25 -0600 (Fri, 24 Oct 2008) | 3 lines
plugin for nose to give "import networkx as nx" context to docstrings
in modules
........
r862 | aric | 2008-10-25 09:16:25 -0600 (Sat, 25 Oct 2008) | 4 lines
remove test boilerplate in favor of nose, move tests to
subdirecdtories with modules
........
r863 | aric | 2008-10-25 09:33:57 -0600 (Sat, 25 Oct 2008) | 2 lines
move readwrite tests to subdirectory and remove testing boilerplate
........
r864 | aric | 2008-10-25 09:36:53 -0600 (Sat, 25 Oct 2008) | 2 lines
mv linalg tests to subdirectory and remove testing boilerplate
........
r865 | aric | 2008-10-25 09:44:46 -0600 (Sat, 25 Oct 2008) | 2 lines
mv algorithms tests to subdirectory and remove testing boilerplate
........
r866 | aric | 2008-10-25 10:00:48 -0600 (Sat, 25 Oct 2008) | 2 lines
move base class tests to subdirectory (mostly unsed tests now)
........
r867 | aric | 2008-10-25 10:09:07 -0600 (Sat, 25 Oct 2008) | 2 lines
update convert to modern scipy sparse interface, remove testing boilerplate
........
r868 | aric | 2008-10-25 10:34:52 -0600 (Sat, 25 Oct 2008) | 3 lines
Clean up setup envieronment for tests.
Use python setup_egg.py nosetests for testing
........
r869 | aric | 2008-10-28 08:03:21 -0600 (Tue, 28 Oct 2008) | 2 lines
set ignore propedit
........
r870 | aric | 2008-10-28 08:08:06 -0600 (Tue, 28 Oct 2008) | 2 lines
adjust svn:ignore on refrence/generated
........
r871 | aric | 2008-10-28 08:10:54 -0600 (Tue, 28 Oct 2008) | 2 lines
add front page sphinx templates
........
r872 | aric | 2008-10-28 08:16:05 -0600 (Tue, 28 Oct 2008) | 3 lines
Add numpy sphinx extensions from
http://sphinx.googlecode.com/svn/contrib/trunk/numpyext sphinxext/numpyext
........
r873 | aric | 2008-10-28 08:17:08 -0600 (Tue, 28 Oct 2008) | 2 lines
add missing file from numpy sphinx extensions
........
r874 | aric | 2008-10-28 08:48:11 -0600 (Tue, 28 Oct 2008) | 2 lines
reorganize sphinx documentation
........
r875 | aric | 2008-10-29 09:01:12 -0600 (Wed, 29 Oct 2008) | 5 lines
remove __all__ from __init__'s in favor of simpler from import
add test runner in test/run.py
........
r876 | aric | 2008-11-01 09:02:56 -0600 (Sat, 01 Nov 2008) | 2 lines
update pre99 sphinx docs
........
r877 | aric | 2008-11-01 09:03:43 -0600 (Sat, 01 Nov 2008) | 2 lines
update documentation in several modules
........
r878 | aric | 2008-11-01 10:28:47 -0600 (Sat, 01 Nov 2008) | 2 lines
update sphinx doc formatting
........
r879 | aric | 2008-11-01 11:04:30 -0600 (Sat, 01 Nov 2008) | 2 lines
typo in conf.py
........
r880 | aric | 2008-11-01 11:05:31 -0600 (Sat, 01 Nov 2008) | 2 lines
update release.py, clean up info.py: that data is misplaced
........
r881 | aric | 2008-11-01 12:42:20 -0600 (Sat, 01 Nov 2008) | 2 lines
clean up doctests to pass with "import networkx as nx"
........
r882 | aric | 2008-11-01 13:08:07 -0600 (Sat, 01 Nov 2008) | 2 lines
update doctests in readwrite/
........
r883 | aric | 2008-11-01 13:15:08 -0600 (Sat, 01 Nov 2008) | 2 lines
fix doctests in algorithms
........
r884 | aric | 2008-11-01 13:24:10 -0600 (Sat, 01 Nov 2008) | 8 lines
fix remaining doctests - move bipartite.txt and threshold.txt out of
the way for now
nosetests --with-networkx-doctest --doctest-extension="txt" networkx
passes all tests
........
r885 | aric | 2008-11-02 06:42:36 -0700 (Sun, 02 Nov 2008) | 2 lines
clean up unused data, add test option to setup_egg
........
--HG--
extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40887
|