| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit a505a5fe000983ff8c0861a1806b31c9ac638946.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix inverse_line_graph.
* Replaces all calls to neighbors() in the line graphs module.
* Adds explanatory note for inverse_line_graph on multiple components.
* Expands and fixes doctests of `inverse_line_graph`
* Small fix of doctest of `inverse_line_graph`
|
|
|
|
|
|
| |
* unnecessary scanning of entire range
* wrong run time in documentation
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Resotre checking PyPy3.
I don't know why it was removed but PyPy3 now supports Python 3.5 and hopefully the next major PyPy version will support PyPy 3.6.
* Fix pypy name.
* Reduce test dependency on items order.
* Change planar_drawing test and allow edge order flips in tests
|
|
|
|
| |
Fixes #3524
Divide by zero replaced with zero simrank value
|
|
|
|
|
|
| |
* Remove the unnecessary usage of the nbrs dictionary.
* Update scc_found just once.
|
|
|
|
|
|
| |
* Added safeguards for input graph G
* Name added to contributors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adding non-randomness measures for graphs
* Adding doc files
* Bux fix in .rst content
* Travis bugs fixing attempt
* Travis bug: numpy import problem
* Travis bug: numpy import problem in test_non_randomness
* following Dan s comments
* following Dan s comments #2
* following Dan s comments #3
|
|
|
|
|
|
| |
Replaced the scc_found dictionary with a set since we don't use the value of the
dictionary.
Changed done's variable type to boolean so that PyPy's JIT would
recognize that there are only two possible states for the condition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* * Implements full join operation and a generator for cographs.
* * Adding myself as a contributor.
* * Fix full join description.
* * Removes full_join function from the cograph generator file.
* * Changes ^ for **.
* Docstrings improvements, fixes and new tests.
* Includes new features in the docs.
* Fix typo in test_cograph.py.
* Random cograph docstring improvements.
* Adds support for directed graphs.
* Improvements to the full join operator and new tests.
* Fixed rename.
* Fix test description.
|
|
|
| |
Example uses nodecolor='r', should be node_color='r'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Included asteroidal module.
* Initial commit for asteroidal module.
The asteroidal module implements a function which checks whether
a given graph is AT-free or not.
* Tests for asteroidal.py
The tests include checks for small, well-known cases of
AT-free and non-AT-free graphs.
* Updated runtime for recognition algorithm in docstring.
* Included "r" to start docstring to enable LaTeX codes.
* Included .rst file for asteroidal module
* Fixed not implemented for decorator statements
If multiple types are inputed into a decorator this
works as an AND condition, but we want an OR condition.
* Refactoring of unnecessary work
The helper function in is_at_free now consists of a return
statement directly, which saves having to evaluate boolean
statements unneccesarily. The for loop in the component_strucutre
function now omits an unecessary generator definition.
* Updated docstring to reflect optional output and runtime.
The docstring now includes a more precise description of the
worst-case runtime. The optional output parameter `certificate`
is more thoroughly documented.
* Change optional output to a tuple including a bool
* Refactor tests to be shorter and more readable
* Included tests with certificate option enabled.
The certificate option outputs a certificate, if any exists,
which proves that a graph is not AT-free.
* Fix bug due to typo in tests
An 's' had snuck its way into an assert_equal statement,
and I didn't check properly before pushing.
* docstring for is_at_free re-structured and re-formulated.
* Split is_at_free method
The previous method had an extra parameter, `certificate`, that could be used
to decide whether the output should be a boolean value or a tuple with a
boolean value and a certificate. This has now been split into two functions:
`is_at_free` and `find_asteroidal_triple`, for more intuitive behaviour.
* Changed `is_at_free` to find_asteroidal_triple
The new version returns an asteroidal triple if one exists
and returns None if none exists. This method is used in the
new `is_at_free` method.
* Updated docstrings
Docstrings updated to reflect changed functionality and
new structure.
* Refactor `find_asteroidal_triple`
The previous version defined a function to check whether a
triple of vertices is an asteroidal triple. The current
version uses this function inline instead, to avoid many
function calls in order to increase performance.
* Refactored return statement in `is_at_free`
Removed the else block according to Chromium style guide.
* feat: expose `find_asteroidal_triple`
The find_asteroidal_triple is also imported when the asteroidal
module is imported.
* style: refactor is_at_free
The function can be written as a readable oneliner instead
of using an if else block.
* docs: asteroidal: updated module docstring
Rewrote module docstring to be more precise.
* chore: include find_asteroidal_triple in reference
The find_asteroidal_triple is now exposed when importing
the asteroidal module so the method should also be included
in the asteroidal.rst for auto-generation of documentation.
* Added myself, Haakon H. Rød, as a contributor
* chore: removed redundant tests
Some tests are no longer valid after changing the output
of `is_at_free` to purely boolean.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add 'NodeId' to the tuple to handle the cases where keys are same for two or more nodes
* Add tests for issue #3493
* consider 'nodeid' while unpacking the tuple from list
* minor changes for PEP8/pycodestyle
* allow arbitrary order of list(G) for py3.5 tests
Fixes #3493
|
|
|
| |
Fixes #3483 which was already partially fixed by #3484
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added group closeness centrality
* Fixed tests
* Added group degree centrality
* Math fixes for docs
* Minor fixes in math
* Doc indentation, exceptions and tests
* Edited test decription
* Remove explicit raise, modify neighbors() raise
* Exception changes
* Revert change, use NetworkXError
|
| |
|
|
|
|
| |
Replace collections.Iterable with collections.abc.Iterable to fix deprecation warning with Python 3.7:
"DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working"
|
|
|
|
|
| |
version 2.3 dropped python2 support until py2 is actually deprecated we
shouldn't mark these wheels as universal
|
|
|
| |
Fixes #3432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* First pass of resistance distance logic
* Made inverting the weight optional.
Removed zero_approx parameter
Added name to contributors
* csr/csc slice and tranformation more effecient and simple for single row/col deletion
* * Split permulation count into seperate funciton
* added tests
* Faster submatrix approach
* Made tests more readable
* Added whitespace
* Clean up styling, pep8
* Fixed nx test class import
* Simplied test imports
* Fixed prior merge error
* Fixed prior merge issue in docstring
* Couple of final pep8 changes
* Added testing for non-scipy builds
* minor tweaks of if logic and comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added the new function onion_layers to core.py
* added details to the documentation ofthe new function onion_layers to core.py
* added the test function test_onion_layers in file test_core.py
* Minor changes to onion_layers()
* Minor changes to onion_layers() and to core.rst
* Small adjustment to core.py
|
|
|
|
|
|
|
|
|
| |
* Added algorithm for calculating maximal k-truss to core.py. Added unit tests to test_core.py.
* Added decorators to enforce graph simplicity.
Added function to documentation generation file.
* Updated implementation for improved performance.
|
| |
|
|
|
| |
fixes #3475
|
|
|
|
|
|
| |
`matplotlib.cbook.iterable` is deprecated in matplotlib 3.1
https://matplotlib.org/3.1.0/api/cbook_api.html#matplotlib.cbook.iterable
Fixes #3466
|
|
|
| |
fixes #3451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented subgraph monomorphism
* Add checks for monomorphism
* Corrected error in test file
* Retrying checks
* Added tests for multigraphs
* Fixed error
* Added more tests
* More tests
* Fixed errors
* Fixed error
* Error
* Added explanation and rewrote mono argument
* Fixed small error
|
|
|
| |
Fixes #3446
|
| |
|
|\
| |
| |
| |
| | |
nandahkrishna/fix-typo-betweenness-centrality-subset-test
Fixed typo in betweenness centrality subset test
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds function for computing SimRank value of nodes
This function returns the SimRank values of each pair of nodes as a
NumPy matrix.
* Moves SimRank algorithm to new similarity module
Also updates and simplifies the code.
* Add similarity docs and tests
* Fix docstring for simrank
* Clean up docs
- Fixes `C / len(nbrs_u) * len(nbrs_v)` to `C / (len(nbrs_u) * len(nbrs_v))`
- Change "from zero to `n` where..." to "from 0 to `n-1` where"
- Split the example on line 1124 to bring it within the 80 char PEP8 line limit
Fixes #1691
|
|
|
|
|
|
|
|
| |
* Update betweenness_subset.py
* Update test_betweenness_centrality_subset.py
* pep8-ify tests
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix UnionFind set extraction
Paths are not guaranteed to be fully pruned by the current
implementation if subtrees are unioned, e.g.:
> uf = UnionFind()
> uf.union(1, 2)
> uf.union(3, 4)
> uf.union(4, 5)
> uf.union(1, 5)
In the current implementation, parents[1]=3 and parents[2]=1.
Thus, the mere call of networkx.utils.groups(parents) will yield a
wrong result:
[set([2]), set([1, 3, 4, 5])]
This patch fixes this behavior by simply doing a "find" operation
(which, in turn, does full path pruning) on every key before calling
groups.
* Add test case for 35db1b5
|
|
|
| |
fixes: #3169
|
| |
|
|
|
| |
read_* should have more see also
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adding networkx.algorithms.centrality.group for group centrality measures
* Minor changes and added tests
* Fixed syntax error in testing, typo and copyright added
* Fixed erroneous test case and error in normalization function
* Updates based on review, fixed code style
* Added more tests
* Improvements and better test case
* More efficient code
* Edited test, file names for group
Fixes #3388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix edge_color inconsistency with node_color and description. Issue #3394
* Alternatives to manage edge_color
* Cycle through edge colors and widths if fewer than edges.
Most color handling done by matplotlib.
* Test arrows colors and widths.
* Test both directed and undirected edge colors and widths
* Alpha is None instead of 1.0
* Also test alpha given in hex
* Add a couple more tests and update for PEP8 style
Fixes #3394
|
|
|
|
|
|
|
|
| |
* Implements the binomial tree graph generator.
* Improvements to the binomial tree generator and Notes section.
* Remove Notes section from the binomial_tree and moves the info to the line under the first line of the doc_string.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add bethe hessian matrix
* travis-ci fixes
* Better coverage
* Add doc includes for Bethe Hessian matrix and spectrum in .rst
* Tidy up author information / top of module of bethehessianmatrix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP add barycenter algorithm
* attr parameter allows saving barycentricity value for each node
* Fix error in test that didn't read updated calculation
Should have included this in fdd22f1002
* Tests don't depend on NumPy, and improve docs
* More doc clean up
* Take advantage of new randomness API in NetworkX 2.2
* barycenter now returns nodes rather than subgraph
This unifies barycenter's signature with center and periphery. See also
https://github.com/networkx/networkx/pull/2939#issuecomment-407757160
* Cross reference docs for center, barycenter, and periphery
* Clarify and simplify doc strings
Also clarify name of a test utility function
* Alphabetize imports
* PEP8: Indent test module with spaces
* Add sp keyword argument to barycenter
This allows barycenter to use pre-computed shortest path lengths.
* Make test more specific
* Doc string style
* PEP8: line lengths
* Weights belong on the edges, not vertices
The test is checking that you can't use the weight and sp arguments at the same
time. For it to be even plausible that we're using the weight argument, the
graph needs weights: *edge* weights. Not node weights as the previous version of
the test had.
* Move TestBarycenter from test_barycenter to test_distance_measures
I don't know the nose package, so I was afraid of trying to develop the tests in
the existing test_distance_measures module. However nose seems to play nicely
with the standard unittest package, so we're all good.
* Clean up tests in test_distance_measures.py
|
|
|
|
|
|
|
|
|
| |
* Move LFR_benchmark to generators
* Correct import line in docstring
* Removed LFR from algorithms.community.rst and put in generators.rst
Fixes #3404
|
|
|
|
|
|
|
|
|
| |
* Make spring_layout raise exception if fixed nodes specified and no pos-dict specified
* Check that any fixed nodes have specified positions in input pos-dict
Note: spring_layout is also fruchterman_reingold_layout.
Before this, fixed nodes not in the pos-dict were assigned random positions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Update generators.rst
Add the reference for the Harary graph generators.
* Update CONTRIBUTORS.rst
Add Weisheng Si as a contributor
|
| |
|
|
|
|
|
|
|
|
| |
* edgebfs name fix
This shows up in the documentation mistakenly
* another edgebfs name fix
|
| |
|