diff options
author | Dilara Tekinoglu <dilaranurtuncturk@gmail.com> | 2022-05-12 21:26:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 11:26:17 -0700 |
commit | b4614ecfa8818fb4b0a886ea645caaa745c716d5 (patch) | |
tree | 12ce278291164b6696dad623c88b9b4cec55b9ea /doc/release | |
parent | f50fc70b8cb6b4f5217a6d5505ba0e2b82b4761b (diff) | |
download | networkx-b4614ecfa8818fb4b0a886ea645caaa745c716d5.tar.gz |
Disallow isolated nodes for Eulerian Path (#5616)
* Disallow isolated nodes for Eulerian path & make related doc_string change
* Remove test for directed graphs with isolated nodes
* Fix syntax error in examples
* Restore deleted tests for euler path
* Fix assertion error
* Fix typo
* Update networkx/algorithms/euler.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update release_dev.rst
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/release_dev.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/release/release_dev.rst b/doc/release/release_dev.rst index 4f46ea53..fa631e5c 100644 --- a/doc/release/release_dev.rst +++ b/doc/release/release_dev.rst @@ -23,6 +23,23 @@ X contributors. Highlights include: Improvements ------------ +- Changed the treatment of directed graphs for `has_eulerian_path` which + used to allow graphs with isolated nodes, i.e. nodes with zero degree to have + an eulerian path. For undirected graphs, on the other hand, `has_eulerian_path` + does not allow isolated nodes. For example: + + >>> G = nx.DiGraph([(0, 1), (1, 2), (2, 0)]) + >>> G.add_node(3) + >>> nx.has_eulerian_path(G) + + The above snippet used to produce `True` whereas the below one used to produce `False`. + + >>> G = nx.Graph([(0, 1), (1, 2), (2, 0)]) + >>> G.add_node(3) + >>> nx.has_eulerian_path(G) + + The change makes the method consistent for both undirected and directed graph types so + that it does not allow isolated nodes. (Both examples produce `False` now.) - `is_bipartite_node_set` now raises an exception when the tested nodes are not distinct (previously this would not affect the outcome). |