| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* One ambigous typo
* one more ambigous typo
* [DATALAD RUNCMD] run codespell throughout
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
For this to work -- it would require configuration files which were abandoned.
See https://github.com/networkx/networkx/pull/6662 for more discussion etc.
* Manual reversion of perform... "fix"
|
| |
|
| |
Rm un-hittable validation lines.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added docstrings examples for clique.py
* Update networkx/algorithms/approximation/clique.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/approximation/clique.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* adding corrections
* adding corrections
* adding corrections to examples
* adding corrections
---------
Co-authored-by: Ross Barnowski <rossbar@berkeley.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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add warning in community doc
* Delete warning in approximation
* undo unwanted changes
* Minor formatting nits.
---------
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add missing reference in all_node_cuts flow_func parameter
* added example to all_pairs_node_connectivity
* Update networkx/algorithms/approximation/connectivity.py
Added suggestion
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/approximation/connectivity.py
added pprint
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/connectivity/kcutsets.py
fix linking
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* solved style problems
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
| |
* Rm maxcardinality param from min_weight_matching.
* Rm min_weight_matching test with cardinality.
* Rm maxcardinality param from christofides implementation.
* Improve clarity of neg wt matching test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6032) (#6068)
* updated test coverage for issue 6032
* updated test coverage for issue 6032
* updated test coverage for issue 6032
* updated test coverage for issue 6032
* updated test coverage for issue 6032
* improved test coverage of dominating_set.py to 100%
* removed unneccessary files
|
| |
|
| |
The weight in the true test result should match the weight in the graph
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Wu et al. and Mehlhorn Steiner approximations
* Change default steiner tree approximation method
* Add missing space in error message
* Changes as suggested
* Fix Kou implementation
* Bugfix and variable name change for Mehlhorn
* Add failing test case for Wu Steiner tree
* Add additional valid Steiner tree for test
* Remove Wu et al implementation
* Style change + remove unused code
|
| |
|
|
|
|
|
|
|
| |
* Allow unsortable nodes in approximate treewidth functions
* Apply suggestions from code review
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* Potential fix?
* removed unneeded line
|
| | |
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Adds two new functions random_spanning_tree and
total_spanning_tree_weight to public networkx API, accessible
from the main namespace.
These functions had previously been defined, tested, and used internally
in the TSP package, but have now been added to the public API as they
are generally applicable.
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>
|
| |
|
|
| |
* Make all graph properties cached properties
* one test function is not needed due to test inheritance
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add deprecated directive to reversed docstring.
* Add missing dep directives to shpfiles.
* Remove defn of INF sentinel.
* typo.
* str -> comment in forloop.
* STY: appropriate casing for var name.
|
| |
|
|
|
| |
* Update numpydoc
* Fix sphinx warnings
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
| |
* Test on Python 3.10
* Fix tests
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
| |
The vertex_cover algorithm updated the cost of u,v twice
in case node v and node u are the same nodes. As a result
self-edged nodes are overlooked. Here we fixed the way vertex_cover
is being updated which also improve the performance compared to the old
implementation
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Stub for Asadpour. Needed to create GSoC PR
* Update to integrate changes from main
* Added function stubs and draft docstrings for the Asadpour algorithm
* 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
* 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
* Reventing documentation changes
* Update mst.py to accept suggestion
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update branchings.py accept doc string edit
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Review suggestions from dshult
* Cleaned code, merged functions if possible and opened partition functionality to all
* Fixed pypi test error
* Implemented review suggestions from rossbar
* review edits
added SpanningTreeIterator to algorithms/__init__.py
* Update __init__.py
ack, hasty / stupid change was meant to be a draft; github isn't letting me make a new branch to PR into this one
* fixed misspelling of Kirchhoff
* Implement suggestions from boothby
Co-authored-by: Thodoris Sotiropoulos <theosotr@windowslive.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Kelly Boothby <kelly.r.boothby@gmail.com>
Co-authored-by: Kelly Boothby <boothby@dwavesys.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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
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>
|
| | |
|
| |
|
|
|
|
|
| |
* Updating average_clustering() documentation - Issue #4734
* Fixing documentation to include G
* Adding output, and fixing random seed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix random.sample warnings in maxcut tests.
* Fix random.sample warnings in betweenness.
* Add sorted to sampling in triads + tests.
* Add sorted to random_uniform_k_out_graph gen.
* add sorted to random.sample in internet_as_graphs.
* No sorted on nodes of graphs in general.
* No sorted in random_uniform graph generator.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc entry
* draft of the undirected case
* added directed version + documentation
* Added unit tests
* code cleanup
* improved docstrings
* seed.choice for initial random node
* removed default value for seed in private functions
* replaced bfs_edges with shortest_path_length
* improved checks for connectivity and strong connectivity
Co-authored-by: atomassi <andrea.tomassilli@sky.uk>
|
| |
|
|
|
|
|
|
|
| |
* updated functions to raise an exception for directed and multigraph
* added maximum_independent_set in the clique module and and updated tests
* updated docs
* module docstring
|
| |
|
|
| |
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
Co-authored-by: atomassi <andrea.tomassilli@sky.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simple maxcut heuristics (#2)
* Simple randomized maxcut heuristic
* Remove approximation guarantee test
Test is not expected to pass all the time due to randomness.
* Preserve random state for cut heuristic
* Add one exchange max cut heuristic
* Fixes && Refactoring && Default deterministic output
* maxcut/simple.py: Add docstring and make initial_cut optional.
* maxcut/simple.py: Add shuffle again. Make initial set a set.
Co-authored-by: Jonas Charfreitag <jcharfreitag@cs.uni-bonn.de>
* Fix parse_edgelist behavior with multiple attributes (#4125)
* Fix parse_edgelist behavior with multiple attributes
* fixed test case
Co-authored-by: chris <chris@orchid>
* CI: temporary fix for CI latex installation issues (#4131)
* Updated draw_networkx to accept numpy array for edgelist (#4132)
* updated draw_networkx + added test
* added newline
* skip test if numpy is not installed
* change skip if numpy is not available
* switch elif to if
* Add tree isomorphism (#4067)
* add code for tree isomorphism, with tests
* fix typo in comment
* one more typo in comments
* fix some PEP8 formatting, that flake8 didn't care about
* rename files as tree_isomorphism
* run code through black formatter
* incorporate feedback from dschult in PR4067
* fix missing import for not_implemented_for decorator
* swap edge order randomly in testing routine positive_single_tree
* run black on test_tree_isomorphism.py
* spacing tweak to allow CI test of docs
Co-authored-by: Dan Schult <dschult@colgate.edu>
* maxcut/simple.py: Updated documentation and some names.
* maxcut/simple.py (Tests): Add _is_valid_cut function and make use of it.
* Move maxcut code to approximation dir.
* maxcut.py: Add not implemented for decorator to maxcut functions.
* test_maxcut.py: Testcase for global optimality.
* maxcut: Fix line width to 88.
* Maxcut: Add __all__ to maxcut.py.
* Maxcut: Use networkx style seed for functions.
* Maxcut: Move to fully soft dependence on numpy.
* Maxcut: Bugfix. Replace choice with sample in test.
* Remove unnecessary set constructor
* Add Max Cut reference in docs
* Fix seed in Max Cut tests
* Add negative weight test for Max Cut
* Improve docstrings
* Fix formatting
* Fix formatting for test file
* Fix formatting for test file
* Docstring formatting touchups.
* Call graph generator from top-level namespace.
* Update networkx/algorithms/approximation/maxcut.py
Docstring type error.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/approximation/maxcut.py
Use compact set construction in randomized_partitioning.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/approximation/maxcut.py
Use compact set construction in _swap_node_partition.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/approximation/tests/test_maxcut.py
Remove comments with no additional information.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Change cut_value to scalar.
* test_maxcut: Better naming for import.
* maxcut.py: Remove one whitespace.
* Update networkx/algorithms/approximation/tests/test_maxcut.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Add comment to why shuffling nodes in one exchange has some benefit.
Co-authored-by: Mohammed Ghannam <Mohammed.ghannam@uni-bonn.de>
Co-authored-by: Christoph Martin <crsqq@users.noreply.github.com>
Co-authored-by: chris <chris@orchid>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Tanguy Fardet <Silmathoron@users.noreply.github.com>
Co-authored-by: Craig Schmidt <craig@craigschmidt.com>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Mohammed Ghannam <mohammad.m.ghannam@gmail.com>
|
| |
|
|
|
|
|
| |
* Setup for numpydoc.
* Add to doc requirements.
* Replace napoleon with numpydoc in conf.py.
* DOC: Fixups from numpydoc.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Format code w/ black
* Format docstrings w/ black
* Manual cleanup
* Tell pytest to ignore planned deprecations
* Don't call plt.show during testing
* Another known deprecation
* DOC: rm duplicate line from docstring example
* Minor cleanup
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
Fixes #3155
|
| | |
|
| |
|
|
|
|
|
|
| |
* excluded self edges
* add to docs and tests
Co-authored-by: Mohammad Abdulmuttaleb <m.abdulmuttaleb@GENIE9.LOCAL>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|