| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix negative edge cycle function raising exception for empty graph and added relevant test function
* Unresolved change
* Added example script for generating mst
* unresolved changes
* update plot_mst.py
* Fixed typo
Co-authored-by: Dan Schult <dschult@colgate.edu>
---------
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
| |
* Update developer requirements
* Run linter
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| |
|
|
|
| |
* Add Morse trie encoding example to gallery.
* Clarify explanation.
|
| | |
|
| |
|
|
|
|
| |
Show how a simple DAG looks when visualized with various available layouts.
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add files via upload
* Delete from drawing folder
* Added in Graphs Folder
* Renamed and edited file
* Update examples/graph/plot_triad_types.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Update examples/graph/plot_triad_types.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Update examples/graph/plot_triad_types.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* updated the plot
* Applied black
* Adjusted Brackets
* More updates to Plot
* Removed brackets
* put back fig.tight_layout(), rebase on main, reword, reorder edges
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
| |
* Remove redundant float conversion
* Remove redundant int conversion
* Use integer division
Co-authored-by: Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix links, use DOI links, wayback machine where required
* Add nx-guides to intersphinx mapping.
* Replace external mpl link w/ intersphinx.
* Update mpl intersphinx mapping.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* fix urllib import
* update urllib import
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add external directory
* Move Javascript and JIT
* Remove application section
* Consolidate and move pygraphviz examples
* Clean up imports
* Reorder
* Fix subclass examples
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Seed layout basic/plot_properties.
* Seed simple path example
* Switch node cmap example to deterministic layout
* Seed layout in edge_colormap example
* Seed graph gen and layout in ego_graph example
* Seed random_geometric_graph example.
* Seed layout and pad axes w/ tight_layout.
* Seed and modify colors for directed example.
* Seeded graph gen and layout
* Switch to plasma colormap for better contrast on light bgnd
* Seed layout and tight_layout sampson example
* Seed and pad axes for unix email example
* Seed graph gen and layout for erdos_renyi example
* Seed graph gen and layout of degree_seq example
* Seed layout of football example
* Seed layout for krackhardt centrality example
* Seed davis club example
* Seed and use np alias in blockmodel example
* Seed beam search example.
* Seed random graph in eigenval example
* Seed heavy metal layout and pad axes
* Use deterministic layout for rgraph example
* Seed layout for printgraph example.
* Add seed to antigraph example.
* Use single rng seed value.
For examples with multiple uses of rng's (e.g. one for
generating a random graph, and another for layout) use a
single integer value as the seed for both.
* Remove unnecessary submodule paths from examples.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Handle kwds explicitly in draw_networkx; fix kwds in examples
* fix PEP8 issues
Fixes #4020
|
| |
|
|
| |
$ find examples -name \*.py -exec pyupgrade --py36-plus {} \;
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
dijkstra_path/length (#3638)
* Add links to single_source_dijkstra in docs for dijkstra_path/length
Fixes #3618
* Fix errors in sphinx build
|
| | |
|
| | |
|
| |
|
|
| |
It only runs scripts starting w/ plot_ by default.
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Improve plots
|
| |
|
|
| |
See b93017c17.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix unix_email and plot more examples
* Fix doctest
* Fix more examples
* Fix AntiGraph.degree generator error in examples
* Style/consistency changes and plot more examples
|
| |
|
|
|
|
|
|
| |
* Silence some sphinx warnings
* Update structure of documentation
See https://github.com/networkx/networkx/pull/2054
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Ensure valid rst file
* Edit text
* Update README and package docstring
* Add myself as a contributor
* Update gitwash
* Fix warnings/errors except citations/footnotes
* Remove old note about 3.0 incompatibility
* Remove stale ref to gh-pages
* Create top-level tools directory (standard practice)
* Use sphinx-gallery extension for examples
* Sphinx-gallery generates images for `plot_` examples
* Comply with pep8
* Don't save figures
|
| | |
|
| |
|
|
|
|
|
| |
Support for the long-obsolete "pydotplus" fork has been reverted back to the
well-maintained parent "pydot" project, fixing #2235. All "nx_pydot" functions
now explicitly require pydot >= 1.2.3, which broke backwards API compatibility
and resolved long-standing Python 2.x issues. Sanity is restored.
|
| |
|
|
|
|
| |
I missed a few of these in my last pass, largely because they didn't
invoke attr_dict directly -- but rather, passed a dictionary object
(enclosed in {}).
|
| |
|
|
|
| |
Also adjusts examples and docs
Cherry-pick from #1930
|
| | |
|
| | |
|
| |
|
|
|
| |
This will help with readthedocs make_gallery #1667
These are solely due to the switch to our 2.0 API
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|