| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* plot_greedy_coloring_Example
* suggestions incorporated
* fix error
* fixed error
* Minor formatting tweaks.
---------
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Add community-detection example
* Fix plot layout
* Create subplot layout
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update mayavi2_spring.py
trial commit
* Example map for GSoC
* Changing errors in the example graph file
* Rename example_map.py to example_map_2.py
* style change to map code
* Trial-map
* Undo mayavi example change.
* Mv example to gallery and use spx-gallery naming scheme.
* Add docstring to MIS gallery example.
* Simplify example.
* Make node coloring more clear.
---------
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| |
|
| |
Co-authored-by: Tina <tina@Tinas-MacBook-Air.local>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* center_node positioned according to param center
* code formatting
* Reverted to files in main
* Adds example of custom node position
* fixes spaces in layout.py
* Update examples/drawing/plot_center_node.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* clearer comment on custom node position
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* See matplotlb 3.6rc1 failure
* replace use of private class method to allow mpl v3.6 to work.
* ensure ax exists before calling colorbar
* Undo matplotlib pin
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
|
|
| |
* 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 deprecated function nx.info
* remove functions from TOC
* replace print(nx.info(G)) with print(G) in example
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
| |
* Remove redundant float conversion
* Remove redundant int conversion
* Use integer division
Co-authored-by: Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* examples
* examples
* examples
* Example changed
* improved styling
* revised
* edge labels
* improved styling
* spacing
* error testing
|
| |
|
|
|
|
|
| |
* CI: sync up black dev requirements version with precommit
* Run black
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix return type in docstring of internal function.
* Rm explicit mention of numpy matrix from class docstrings.
* Fix return type of floyd_warshall_numpy docstring.
* Remove mention of numpy matrix from code comment.
* Fix simrank similarity internal docstring.
* Rm explicit mention of matrix in favor of 2D array.
* Update to_networkx_graph array exception wording.
* Remove extraneous mention of numpy matrix.
* Don't print array in exception message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simplify construction of G with edges rm'd
* Rm unused graph attribute.
* Shorten categorization by node type.
* Simplify node coloring.
* Simplify isomorphism check.
* Rm unit test.
* Rm redundant plotting of each subgraph.
|
| |
|
|
|
| |
Adds an example of the using Christofides to solve the TSP problem to the example galery.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create plot_subgraphs.py
https://github.com/networkx/networkx/issues/4220
* Update plot_subgraphs.py
black
* Update plot_subgraphs.py
lint plus font_size
* Update plot_subgraphs.py
added more plots
* Update plot_subgraphs.py
removed plots from the unit test and added comments
* Update plot_subgraphs.py
lint
* Update plot_subgraphs.py
typos fixed
* Update plot_subgraphs.py
added nodes to the plot of the edges removed that was commented out for whatever reason
* Update plot_subgraphs.py
revert the latest commit - the line was commented out for a reason - it's broken
* Update plot_subgraphs.py
fixed node color issue
* Update plot_subgraphs.py
format fix
* Update plot_subgraphs.py
forgot to draw the nodes... now fixed
* Fix sphinx warnings about heading length.
* Update examples/algorithms/plot_subgraphs.py
* Update examples/algorithms/plot_subgraphs.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop Py37
* XML serialization issue
* Use math.comb
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
* Run pyupgrade --py38-plus
* Run black
* More documentation
* Deprecate euclidean
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
|
| |
|
|
| |
A more descriptive variable name for exceptions. This reduces local var naming conflicts when
\`e\` is used e.g. to represent edges as a loop variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rst double colons for example code
* add nx. prefix to doctest function calls
* Remove one line from 1->2 migration rst file
the line shows code that works for 1.x *and* 2.x.
But it no longer works for all v2.x code. Readers should just use the
next line of code, so no reason to keep this in the file.
* capture output from subplot and rename DiGraph as DG in introduction.rst
* skip running the entire test suite as an example in old_release_log.rst
* doctest of examples
* remove changes to nexp files
|
| |
|
|
|
|
|
| |
* Add comment about single core CI/CD showing slower parallel output in example script.
* less specific estimate of speedup
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Add local copies of custom node icon pngs.
* Update example to use local images.
* Force FancyArrowPatch to respect tgt distances.
min/max_target_distance kwargs are only supported by FancyArrowPatch.
Force drawing with FAPs and add comment explaining how/why.
* Add seed to layout for reproducibility.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
| |
* adds implementation of SNAP summarization algorithm
Thanks to dschult and rossbar for many much-needed recommendations for refining and optimizing the implementation
* Seed layouts for snap gallery examples.
Make sure the layouts are reproducible.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* fix urllib import
* update urllib import
|
| |
|
| |
Make igraph plotting example render in gallery
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added images to the generate graph
* Cleaned up comments
* Added comment for node addition
* Ross's suggestion
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Ross's suggestion
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Ross's suggestion
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Ross's suggestion
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* revised code
* added comment
* Update examples/drawing/plot_mpl_annotations.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update examples/drawing/plot_mpl_annotations.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Rename plot_mpl_annotations.py to plot_custom_node_icons.py
Co-authored-by: Alex <a.c.walker@student.tudelft.nl>
Co-authored-by: Sharwin Bobde <31354242+sharwinbobde@users.noreply.github.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Sharwin Bobde <bsharwin@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Correct and update Atlas example
An email from Philip Boalch points out that the previous
code didn't include graph number 208 and used a
`could_be_isomorphic` fast routine which returned
incorrect results.
The correct number of connected graphs with 6 or fewer nodes is 142.
* adjust docstring to explain how 142 and cited sequence relate
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add pygraphviz image scraper to doc config.
* pgz gallery example - switch to agraph.draw
* Move pygraphviz examples out to demo img scraper.
* TEMP: point to pgz with scraper for CI.
* Add support for comments in requirements files.
* TEMP: remove extra deps from setup.py.
Just to get CI running with un-deployed pygraphviz.
* Two graphviz categories: layout and drawing.
* Update deps to pgv1.7rc1.
* Revert removal of key from 2fb3101
* Add pygraphviz to intersphinx mapping.
Update intersphinx links and internal links to drawing modules.
* Add links for drawing functionality.
pygraphviz via intersphinx + write_dot.
|
| | |
|
| | |
|