| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
| |
Improperly formatted Notes/References sections was causing a sphinx
parsing error which led to a very poorly formatted html page.
Fixing the numpydoc formatting for the module docstring + minor
munging of the heading levels was sufficient to fix this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add simple cycle enumerator for undirected class
* Implemented Gupta & Suzumura and refactored Johnson in a common form
and unified their call-site. Now, users can enumerate simple cycles
of directed or undireced graphs, with bounded or unbounded length,
all from the same `simple_cycles` function. I abandoned the stretch
goal of enumerating chordless cycles, as they are not gracefully
handled by the algorithms of Johnson nor Gupta & Suzumura.
* updated tests for simple_cycles to include undirected graphs
* * fixed documentation issues, elaborated on algorithm details
* restricted to nontrivial components
* removed specialized DFS to pick edges from undirected components
lemma: if G is a biconnected graph with at least 3 nodes and
e is an edge in G, then e belongs to a cycle
* added tests for undirected and bounded cases for simple_cycles
* added handling for digons in multigraphs
* * Improved support for multigraphs
* Split chordless_cycles out from simple_cycles because the case
analysis got so tricky
* Added enhanced cycle-testing framework to tests for simple_cycles
* Added tests for multigraphs
* Needs more documentation
* * Documented simple_cycles
* Caught incorrectly-handled case of parallel self-loops
* removed chordless option from simple_cycles
* typos/raises/leftovers in docs and error/corner tests
* add a quick example to chordless_cycles
* Add chordless_cycles to docs
---------
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Mridul Seth <git@mriduls.com>
|
| |
|
|
|
|
| |
* Add example clarifying nbunch to the glossary entry
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add graph_str
Formatted
Fix bug in choosing the source
Fix test
* Fixed issue in choosing source verticies for directed graphs
* reasonable working state
* Fixed logic issues
Fix test, cleanup, formatting
more tests, better comments, fix parent labels
fix pypy issue
Fix format
* Fixes based on review
* Cleaned up test names
* Use open_file decor and remove graph_str
* Remove useage of forest_str from doctest
* Fix style
* style
* Update networkx/readwrite/text.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Fixed half sentense
* Add max_depth
* moved comment position
* Describe max depth in algo description
* Allow with_labels to be specified as a str
* Update networkx/readwrite/text.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Add network text autodoc stub
* Add removal note for forest_str
---------
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* first commit, start testing
* rename
* formatting with black
* formating example based on testing failure
* deleting example from docstring
* rewriting example based on eigenvector.py
* rewrite docstring for other supplementary functions
* formating with black
* deleting custom scipy function
* rewriting matrix manipulation
* rewriting nbunch iteration based on review
* rewriting dictionary update
* update directed_laplacian_matrix_args params
* rewriting docstring based on comments
* update docstring
* update docstring with Laplacian energy def
* update docstring
* bringing package imports into the function
* adding laplacian.py to needs_numpy and needs_scipy tests
* addig Laplacian centrality to centrality.rst
* formatting with black
* dictionary update fix
* beatify docstring
Co-authored-by: Dan Schult <dschult@colgate.edu>
* beatify docstring
Co-authored-by: Dan Schult <dschult@colgate.edu>
* beatify docstring
Co-authored-by: Dan Schult <dschult@colgate.edu>
* beatify docstring
Co-authored-by: Dan Schult <dschult@colgate.edu>
* beautify with black
* add ** to kwargs in function
* add test file for local testing
* black test file
* black
* replace nx.laplacian to direct import
* adding pytest importskip and formating with black
* adding laplacian centrality to the init file
* changing import from direct to nx.laplacian
* rewriting output for non-normalized option
* rewriting tests using functions instead of class structure
* mod with black
* formating
* formating
* directed and undirected laplace and eigen values correction
* black formating
* adding asfptype for sparse eig solver and format with black
* change from sparse solver to dense solver
* change back A_2 eigval solver
* format with black
* black
* change back to previous state
* change back to previous state
* new eigh func
* fix eighvals func
* adding laplacian matrix parameters
* change alpha to None
* change back alpha to 0.95
* adding nodeset and ful nodelist objects
* adding nodeset and relevant error message
* solving directed-undirected issue converting everything to sparse matrix
* change line ending
* untrack env files
* isort test file
* adding nodelist and noteset
* black
* change centrality calculation to nodeset instead of full nodelist
* added comment
* eigh_f func to one-liner
* move eigh value calculation outside if condition
* simplify row/column by advanced indexing
* simplify row/column by advanced indexing for set diag
* format with black
* wrap doc_string to 88 chars and reword optional keywords.
* handle nodelist and nodeset
* remove casting as a csr_matrix
* covert to dense since we have to for computing the spectrum anyway.
* minor: ease readability
* fix normalization
* add tests for normalized and weight kwargs
* fix black
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Gabor Berei <bereig@starschema.net>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented conversion from networkx graph to latex graph.
* Removed latex cache files uploaded by error.
* Resolved placeholders file import issue.
* Removed dependency to numpy
* Updated test
* Wrapped test for numpy dependency
* Updated test name
* format changes to nx_latex.py and friends.
vertex -> node, vertices -> nodes
PEP8 spacing and tabs
pytest function instead of class (class not needed here -- no imports)
Moved author info to CONTRIBUTORS.rst as our new standard
converted list comprehension done for side-effects to for-loop.
switch to f-strings from string-format calls
update setup.py to remove conflicts
* Remove numpy requirement for testing latex
Also pep8 formatting
* reorder imports in __init__
* Attempt to debug windows/appveyor adigraph error
* try again
* Remove types, run pre-commit
* blackify
* pyupgradify
* inline latex placeholders and expected_tex.
Check not multigraph.
Add example
Change variable name `file` to `latex_code`
inline if/else for __init__ setup
* Change tabs to spaces
* pull apart Adigraph to simplify interface
* remove class Adigraph completely in favor of functions
* replace default layout to be circular.
(matches adigraph and avoids using random seeds in tests
* fix old version of isort result
* update documentation and include with rst file. Update some tests
* make docs more complete, checked and add tests
* Cleanup extra file changes that aren't needed
* Add TikZ version of to_latex as default
* improve docs
* Make the networkx latex interface via TikZ and not adigraph
* fix rebase
* Apply suggestions from code review
Co-authored-by: Mridul Seth <mail@mriduls.com>
* comment out print statements in tests
* Turn off multigraph for latex
* Remove tests of `line width` and edge label placement
* add back line width style, fix placement of style on edges.
* Set default layout to have radius 10
Co-authored-by: Mridul Seth <mail@mriduls.com>
* fix docstring test
* Minor docstring formatting nits.
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
Co-authored-by: Mridul Seth <git@mriduls.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Wrappers classes to dispatch to a backend
* Rework the backend dispatching
- Use __networkx_plugin__=name to find graph-like objects instead of
subclassing
- Add PluginInfo to smooth over differences in importlib.metadata across
python versions
- Add dispatch behavior override via environment variable to aid in
testing plugins
* Dispatch more algorithms and improve auto-test capabilities
* Allow dispatcher decorator without a name
- Name is taken from the decorated function
- Raise error if backend doesn't implement a decorated function which is called
- Check for duplicate names for dispatching algorithms
* Make sphinx pick up backend docs
* make black happy
* Rename decorator to _dispatch as it's experimental
* A few more dispatched functions
* Make convert to and from methods for auto-testing
- Rename `convert` to `convert_from_nx`
- Add `convert_to_nx` function
These will allow backends to return native objects when dispatching,
but provide a mechanism to convert the result to the type expected
by NetworkX tests for the auto-test plugin mechanism.
* More dispatching
* Include name with `convert_**_nx` methods
* Remove known plugin names
This check is not needed, as any plugin can register itself in the entry points section.
The dispatching and auto-testing explicitly specify the plugin to use, so there is no
need to hardcode the options.
These were originally included for security, but any malicious actor would simply use one
of the valid names, so having a hardcoded list does not actually provide any meaningful
security.
* Add `dispatchname` to dispatchable functions
Co-authored-by: Jim Kitchen <jim22k@gmail.com>
Co-authored-by: Erik Welch <erik.n.welch@gmail.com>
|
| |
|
|
|
|
|
|
| |
- Update exception message for MappedQueue when queue elements are not comparable.
- Adds tests for MappedQueue elements
- Adds MappedQueue to the refguide and improve documentation, esp. examples.
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Preliminary implementation of the candidate node pair ordering of VF2++
* Removed unused lines of code
* Added todos
* Added demo and pseudocode for VF2++
* Pointed out a problem with the pseudocode
* Initialisation of the VF2++ basis structure
* Initialise the GraphMatcher
* Remove useless changes
* Check labels for the node ordering + demo
* Code to verify the ordering
* Implement the ISO feasibility check
* Implement the IND feasibility
* Create State class
* Fixed Dan's code for the ordering
* Preliminary form of the node ordering
* Add visualisation
* Use list comprehension for the Ti computation
* Remove function
* Create Unit Tests
* Add labels check + update unit tests
* Add pre-computation of G-labels
* Remove todo
* First implementation of the candidate selection
* Initial version of candidate selection
* Remove unnecessary files
* Merge candidate selection cases into one
* Create a function to incrementally update Ti and Ti_out
* Unit Test for the Ti updating
* Implement the Ti/Ti_out restoring
* Finish the restoring of Ti and create unit test
* Update test file names
* Uncommented test section
* Replace redundant loop with for-any
* Create unit test for candidate selection using the same label for all nodes
* Create unit test for candidate selection using different labels for the nodes
* Update feasibility tests without the use of the state class
* Create more unit tests for the feasibility checking
* Provide explanation for the unit tests
* First successful test of the complete ISO VF2++ algorithm (except from the buggy ordering)
* Fix bug: when popping a node to climb up the DFS tree we need the previous node ordering (containing the node that we just popped)
* Create a separate file for the VF2++ ISO algorithm
* Delete file
* Remove redundant iteration and memory use
* Demo for different labels
* Add benchmark for the incremental Ti updating
* Remove unnecessary class
* Fix bug with the ordering WOOOHOOOOO
* Unit tests for the node ordering
* Add unit tests for the VF2++ ISO
* Fix ordering
* Probablly fix logic error in ordering
* Reformatted with black
* Test precommit
* Test precommit
* Test pre commit
* Testing pre commit
* Update networkx/algorithms/isomorphism/tests/VF2++/test_vf2pp.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Add unit tests for vf2++
* Added vf2++ unit test
* Added precheck for VF2++
* Add unit tests for the precheck
* Updated the benchmarking
* Updated the benchmark
* Apply hooks
* Add documentation for the ordering
* Add documentation for the candidate selection
* Added documentation for the feasibility
* Added documentation for vf2++
* Separate functions for ISO feasibility
* Refine unit tests
* Apply hooks
* Force reformat all files
* Remove redundant return statements from VF2__
* Apply hooks
* Apply hooks
* Format
* Minor changes
* Add unit tests
* Adjusted benchmark
* Fix benchmark
* Isort
* Isort benchmark
* Apply optimization in the candidate selection
* Track matched node with pointer
* Adjust benchmark
* Restructure in VF2 function
* Make VF2++ EXTREMELY PRETTY
* Removed sorting in feasibility rules
* Get rid of visited set, check mapping instead
* Update networkx/algorithms/isomorphism/tests/VF2++/test_vf2pp.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Made color assignement deterministic in VF2++ unit tests
* Add keyword argument in unit tests
* Hoepfully fix pipeline errors
* Add vf2++ unit tests for multigraphs
* Add Unit tests for Feasibility
* Add unit tests for feasibility on multi graphs
* Finalize feasibility tests for multigraph settings
* Update documentation
* Remove list comprehension and boost performance
* Add unit tests for both graphs and multi graphs, using same labels
* Isort
* Optimized precheck
* Replace loop with any
* Optimize multigraph chceck
* Transfer except statement
* Check order consistency
* Cache degrees and labels from the beginning
* Delete benchmark to create new
* Fix precheck bug
* Adjust unit tests
* Add benchmark for perofmance comparison between VF2 and VF2++
* Fix Ti computing tests
* Hopefully fix isort
* Add benchmark for the candidate selection methods
* Rename modules: lower case, remove +
* Refactor VF2++ arguments
* Adjust VF2++ to work with multiple node labels
* Add unit tests for multiple labels
* Adjust for different number of labels per node
* Finish arguments of VF2++
* Add user functions
* Exported the two vf2++ functions
* Added underscore prefix to private functions and fixed tests
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/isomorphism/demo.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Apply suggested changes
* Refactor rst files
* Rm unnecessary toctree from isomorphism page.
* Autodoc vf2pp module + public functions.
* Rm dedicated vf2pp reference article.
* Rm extra vf2pp listing from autosummaries.
* Add summary of three functions to module docstring.
* Make sure docstrings match their functions.
* Refactor everything
* Format code
* Add unit test
* Inline process level function in node ordering
* Perform intersection first rather than last
* Update networkx/algorithms/isomorphism/vf2pp_helpers/candidates.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Replace return statement with multiple operations and make it more readable
* Update networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Fix multigraph bug in update_Tinout
* Abstract the argmax function
* Add unit test for first case of candidate selection
* Create unit test for all candidate selection cases
* Remove re-definition of namedtuple parameters
* Update doc/reference/algorithms/isomorphism.rst
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/__init__.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Delete benchmark file
* Add demo file
* Create util file containing the helper functions, common across all unit tests
* Fix CI/CD
* Make unit tests for Ti updating specific
* Remove util functions from vf2pp tests
* Remove utils functions from multivf2pp tests
* Remove utils functions from candidate tests
* Remove utils functions from ordering checks
* Remove utils functions from Ti tests
* Add example in docstring
* Remove unused utils functions
* Separate initialization of vf2pp
* Inline functions and add new abstract function for pushing to stack
* Inline push to stack
* Add commentsa
* Separate precheck functions
* Replace method with existing networkx function
* Include label initialization inside parameter initializer function
* Rename Tiout to Titilde
* Update networkx/algorithms/isomorphism/tests/vf2pp/test_Ti_computing.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Use canonical setitem for dictionary insertions
* Update networkx/algorithms/isomorphism/tests/vf2pp/test_precheck.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Remove variable assignement
* Merge unit tests of vf2pp for graphs and multigraphs into the same file
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Change variable name
* Update networkx/algorithms/isomorphism/vf2pp.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Re-write ordering unit tests
* Rename vf2pp solver
* Update networkx/algorithms/isomorphism/vf2pp_helpers/feasibility.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Replace abstractified argmax function with two loops for readability
* Apply final changes
* Fix mistake
* Update ref guide to reflect new fn names.
* Update docstrings
* Fix line length in module docstring
* Copy updated parameter section to all 3 public fns.
* Add Yields section to all_isomorphisms fn.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
| |
Add function bfs_layers to docs. fix two doc formatting typos
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: Replace functions to evaluate tests.
* Raise prompt exceptions by wrapping generator.
* Fix erroneous ground-truth self-ancestor in tests.
* Move pair creation outside of generator and validate.
* Convert input with fromkeys to preserve order and rm duplicates.
* Replace LCA implementations & update tests.
* Test cleanup: move new tests into old class.
Allows us to get rid of duplication/another test setup.
* Rm naive fns from refguide.
* Add release note.
* Remove unused imports.
* Remove missed duplicate function (bad rebase).
Co-authored-by: Dilara Tekinoglu <dilaranurtuncturk@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* Fix examples section formatting in condensed docstr.
* Rm stray reference to ordered grpahs.
* Add naive LCA algs to reference guide.
* Fix heading names in LCA docstrings.
|
| |
|
|
|
|
| |
Removes the deprecated OrderedGraph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Point to Python 3.x doc for the description.
This is a nit patch though,
use 3.x document url as Python 2.x has been deprecated a long time ago.
* Update doc/reference/glossary.rst
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* period.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
product (#5845)
Fix docbuild warnings
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Corona product implemented.
Todos:
Docs
Test for corona product
* Corona Product Added and Works Correctly now.
* document added.
* corona product test added
* corona product added to __all__
* add corona_product to operators.rst
* precommit format fixed
* Memory usage problem in the corona product improved
* Update networkx/algorithms/operators/product.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* temp list replaced with generators
* single qoutes problem in doc string
* doc clean up
Co-authored-by: Dan Schult <dschult@colgate.edu>
* doc clean up
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update Tests
`size()` is like the `number_of_edges()` method.
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add tests for directed edge swap
* Add directed edge swap algorithm
* Allow more swaps in directed tests
* Fix errors in swap.py to meet test criteria
* Remove TODOs
* Update documentation for directed_edge_swap and run black
* Fix incosistent spacing
* Add references
* Added PR to release docs
* Fix reference formatting
* Improve documentation
* An -> A
* Update networkx/algorithms/swap.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Add 'Raises' section to documentation
* Update tests to use keyword arguments for directed_edge_swap
* Fix references to 'triple-edge' swap
* Use not_implemented_for decorator for directed_edge_swap
* Rename n to tries and remove unnecessary updates
* Rename e to msg
* Use 'succ' instead of 'out_edges' for getting successors
* Update networkx/algorithms/swap.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/tests/test_swap.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/tests/test_swap.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/tests/test_swap.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update networkx/algorithms/swap.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Convert gnp graphs to path graphs for clarity
* Use seed when testing directed edge swap
* Check node equality sooner
* Add directed_edge_swap to documentation
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
| |
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| | |
|
| |
|
|
|
|
|
| |
* Make HITS numpy and scipy private functions
* fix examples with correct imports
* remove functions from TOC
|
| |
|
|
|
| |
* Remove deprecated functions hub_matrix and authority_matrix
* remove functions from TOC
|
| |
|
|
|
|
|
|
|
|
| |
* 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 gdal dependency
* [skip ci] Rm mention of gdal from roadmap.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
| |
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
|
|
|
|
|
| |
* Remove coverage and performance from quality
* [skip ci] rm coverage and performance from refguide.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
|
|
| |
* Remove deprecated function extrema_bounding
* remove functions from TOC
|
| | |
|
| |
|
|
|
|
|
| |
* Replace node_classification subpackage with a module
* update node_classification doc reference
* remove node_classification from setup.py
|
| |
|
|
|
|
|
|
| |
* Remove generate_unique_node
* [skip ci] rm from refguide.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
|
| |
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| |
|
| |
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
| |
(#5761)
* Remove deprecated functions make_small_graph and make_small_undirected_graph
* remove functions from TOC
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Remove betweenness_centrality_source in favor of preferred name,
betweenness_centrality_subset.
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
Rm to_numpy_matrix and from_numpy_matrix and related tests
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
|
| |
|
| |
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
|
| |
|
|
|
|
|
| |
* Remove deprecated function make_str
* [skip ci] rm from reference guide.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
Adds chromatic_polynomial function to the graph polynomials package.
|
| |
|
|
|
| |
* Add polynomials to the algorithms toctree
* fix indents for sphinx
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adding more examples of to_numpy_array method's usage
* Run black for auto-formatting
* Fixing a minor typo in the example
* Fixing a minor typo in the example
* Converting nonedge value to float in the example
* Changed nonedge to -1. & update example to match PEP 8
* Improve docstring for bethe_hessian_matrix (#5458)
Fix reference linking, improve spacing/docstring formatting,
improve example.
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mehmet Müjde <mehmet.muejde@me.com>
* Add notes about NumPy/SciPy integration to NX 2->3 migration guide (#5505)
* Add skeleton about numpy/scipy to migration guide.
* Update release timeline.
* Comment out todo and touchup text on random.
* Finish recarray/structured dtypes section.
* Add blurb about pagerank.
* Add section about matrix->array.
* Reorganize and link.
* Fix rst.
* Fix formatting
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* Run black on docs (#5513)
* Run black on docs
* Remove redundant dependencies
* Format docs
* Finalize release notes
* Designate 2.8 release
* Fix release notes
* Bump release version
* Change default value of arrowstyle for undirected graphs (#5514)
* Change default value of arrowstyle for undirected graphs
* Update networkx/drawing/nx_pylab.py
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* added edge labels in weighted graph (#5521)
* examples
* examples
* examples
* Example changed
* improved styling
* revised
* edge labels
* improved styling
* spacing
* error testing
* Add is_planar function
* Fix minor spacing error
* Fix minor space error
* Update networkx/algorithms/planarity.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/algorithms/planarity.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Call check_planarity in is_planar
* Make suggested changes
* Add is_planar to autosummary
* Update planarity.py
* Fix typo
* Delete duplicate see also section
* Run black for styling
* Rst formatting updates.
* Fix docstring heading name.
* Minor wording change
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mehmet Müjde <mehmet.muejde@me.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Nikita Sharma <70018371+NikitaSharma1@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
| |
Add a new polynomial module to algorithms for characteristic polynomials.
Adds the Tutte polynomial, which is computed and ultimate represented as a
sympy expression.
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
| |
* Fix docs
* Fix typos.
* Remove link which will break
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adjust functions appearing in `__all__` but not in docs
* clean up coloring: merge two modules make interchange private
* fix duplicate name. Probably should be changed
* fix "see also" doc of recursive_simple_cycles
* Rm internal uses of deprecated .
* Fixup warnings filters regex.
* clean up a bit more, make Node & AdjList private classes
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Step 1: use sparse arrays in nx.to_scipy_sparse_matrix.
Seems like a reasonable place to start.
nx.to_scipy_sparse_matrix is one of the primary interfaces to
scipy.sparse from within NetworkX.
* 1: Use np.outer instead of mult col/row vectors
Fix two instances in modularitymatrix where a new 2D array was being
created via an outer product of two \"vectors\".
In the matrix case, this was a row vector \* a column vector. In the
array case this can be disambiguated by being explicit with np.outer.
* Update _transition_matrix in laplacianmatrix module
- A few instances of matrix multiplication operator
- Add np.newaxis + transpose to get shape right for broadcasting
- Explicitly convert e.g. sp.sparse.spdiags to a csr_array.
* Update directed_combinitorial_laplacian w/ sparse array.
- Wrap spdiags in csr_array and update matmul operators.
* Rm matrix-specific code from lgc and hmn modules
- Replace .A call with appropriate array semantics
- wrap sparse.diags in csr_array.
* Change hits to use sparse array semantics.
- Replace * with @
- Remove superfluous calls to flatten.
* Update sparse matrix usage in layout module.
- Simplify lil.getrowview call
- Wrap spdiags in csr_array.
* lil_matrix -> lil_array in graphmatrix.py.
* WIP: Start working on algebraic connectivity module.
* Incorporate auth mat varname feedback.
* Revert 1D slice and comment for 1D sparse future.
* Add TODOs: rm csr_array wrapper around spdiags etc.
* WIP: cleanup algebraicconn: tracemin_fiedler.
* Typo.
* Finish reviewing algebraicconnectivity.
* Convert bethe_hessian matrix to use sparse arrays.
* WIP: update laplacian.
Update undirected laplacian functions.
* WIP: laplacian - add comment about _transition_matrix return types.
* Finish laplacianmatrix review.
* Update attrmatrix.
* Switch to official laplacian function.
* Update pagerank to use sparse array.
* Switch bipartite matrix to sparse arrays.
* Check from_scipy_sparse_matrix works with arrays.
Modifies test suite.
* Apply changes from review.
* Fix failing docstring tests.
* Fix missing axis for in-place multiplication.
* Use scipy==1.8rc2
* Use matrix multiplication
* Fix PyPy CI
* [MRG] Create plot_subgraphs.py example (#5165)
* 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>
* Add traveling salesman problem to example gallery (#4874)
Adds an example of the using Christofides to solve the TSP problem to the example galery.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges() (#5037)
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges()
* Resolved Requested Changes
* Revert changes to degree docstrings.
* Update comments in example.
* Apply wording to edges method in all graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Compatibility updates from testing with numpy/scipy/pytest rc's (#5226)
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
* Replace internal `close` fn with `math.isclose`. (#5224)
* Replace internal close fn with math.isclose.
* Fix lines in docstring examples.
* Fix Python 3.10 deprecation warning w/ int div. (#5231)
* Touchups and suggestions for subgraph gallery example (#5225)
* 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.
* Use new package name (#5234)
* Allowing None edges in weight function of bidirectional Dijkstra (#5232)
* added following feature also to bidirectional dijkstra: The weight function can be used to hide edges by returning None.
* changed syntax for better readability and code duplicate avoidance
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
* Add an FAQ about assigning issues. (#5182)
* Add FAQ about assigning issues.
* Add note about linking issues from new PRs.
* Update dev deps (#5243)
* Update minor doc issues with tex notation (#5244)
* Add FutureWarnings to fns that return sparse matrices
- biadjacency_matrix.
- bethe_hessian_matrix.
- incidence_matrix.
- laplacian functions.
- modularity_matrix functions.
- adjacency_matrix.
* Add to_scipy_sparse_array and use it everywhere.
Add a new conversion function to preserve array semantics internally
while not altering behavior for users.
Also adds FutureWarning to to_scipy_sparse_matrix.
* Add from_scipy_sparse_array. Supercedes from_scipy_sparse_matrix.
* Handle deprecations in separate PR.
* Fix docstring examples.
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Andrew Knyazev <andrew.knyazev@ucdenver.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: eskountis <56514439+eskountis@users.noreply.github.com>
Co-authored-by: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com>
Co-authored-by: NikHoh <nikhoh@web.de>
Co-authored-by: Hohmann, Nikolas <nikolas.hohmann@tu-darmstadt.de>
Co-authored-by: Sultan Orazbayev <contact@econpoint.com>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|