summaryrefslogtreecommitdiff
path: root/networkx/algorithms/smallworld.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in the networkx codebase (#6335)Anurag Bhat2023-01-051-1/+1
| | | | | * Fix_Typos * Commit_Suggestions
* bug fix in smallworld.py: random_reference and lattice_reference (#6151)Paula Pérez Bianchi2022-12-201-3/+17
| | | | | | | | | | | | | | | | | | | * raise exception if graph has less than 2 edges in random_reference and lattice_reference and tested * Updated lattice_reference doc * Update networkx/algorithms/smallworld.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/tests/test_smallworld.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Added some suggestions * Added some final suggestions Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Use isort with pre-commit to enforce import guidelines (#5659)Mridul Seth2022-06-021-2/+2
| | | | | * Add isort to pre-commit * Run isort on all python files (except __init__.py ones)
* Keep omega within [-1, 1] bounds (#5216)Fabrizio Kuruc2022-02-121-19/+34
| | | | | | | | | | | | | | * Adjusted calculation of small-world metric omega to be within the correct bounds * Update docstring to reflect that there is no hard bound on omega * add release note * maint: rm print statements from tests. * Update release file per comment Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fix typo smallworld.omega (#5066)WillShardlow2021-09-061-1/+1
|
* Remove decorator dependency (#4739)Kelly Boothby2021-06-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added argmap decorator * removed most dependency on decorator * removed last reference to decorator? * Made the compilation of argmap-decorated functions lazy to reduce import time. * black * reworked try_finally to make cleanup cleaner * first pass at documentation; general cleanup * incorporated dschult's comments * rest formatted docstrings * added unit tests and fixed a few bugs that cropped up * Apply suggestions from code review Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu> * Exapnd docstrings for decorators.py * * refactored try_finally into a keyword-only argument * more tweaks to documentation re: @stefanv's comments * additional unit test for signature-clobbering decorators * spellcheck my txt and expand new test to help me grok it * rehash docstrings for sphinx * rewrite docs to provide some examples where argmap used without @argmap * doc tweak * last touches * documentation clarifications * run black * doc review * remove decorator module from github workflows and INSTALL.rst * add text to release_dev to describe highlights and improvements here Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu>
* Fix docstrings and remove unused variables (#4501)Andrea Tomassilli2021-01-091-2/+0
| | | | Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Format w/ blackJarrod Millman2020-07-101-13/+15
|
* Remove boiler plate from top of modulesJarrod Millman2019-11-111-6/+0
| | | | | | | | | The copyright and author stuff is not necessary, out-of-date, and inconsistent. It takes up visual space and is a pain to police everyone doing the same thing on the top of the module. Git handles authorship in a comprehensive and authoritative way. The LICENSE.txt file applies to all project code.
* Remove unused importsJarrod Millman2019-10-181-1/+1
|
* Replacing `Return` to `Returns` in docs for functions (#3301)Moradnejad2019-02-181-2/+2
| | | | | | * Fixed problem in documentation view of this function * Replacing `Return` to `Returns` in function docs
* Update docs with all functions left out of rst files (#3091)Dan Schult2018-07-271-39/+37
| | | | | | | | * Update docs with all functions not added to rst files Also add script to find these functions * put back removed periods after references
* Unify random state treatment across package (#3058)Dan Schult2018-07-161-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1764 * Add a doc page to explain random number generator handling * replace deprecated numpy.random.random_integers with randint * First set of random_state decorator updates... utils and some generators * protect numpy import from failure is not there * fix doctests in randomness.rst * Update algorithms for new random_state paradigm * Fix tests dependent on python version * Update random_state paradigm in rest of the modules * fix tests for wierd cases. windows 32bit doesn't like big seeds. smallworld wasn't sending seed to utils.discrete_sequence * Add tests. Rewrite randomstate interface class to fix tests * anogther tweak for osx with no deps * improve doc examples for seed. Check all functions for seed independence. Calling with int seed should not affect global RNG * Add testing script and add more variates to RandomInterface * fix typo and remove unneeded file causing nodetest trouble * fix doctest for randomness.rst
* Small-world analysis (#2528)Romain2018-06-031-0/+362
* added small-world coefficients (sigma and omega) * added Romain to contributors * added smallworld test * added smallworld test * cleaned code * fixes for unit tests * fixes for nose test * fixes for nose test * Use transitivity to measure the clustering coefficient * added connectivity constrain * Reduce time of tests, tweak docs and pep8 * Increase test coverage