summaryrefslogtreecommitdiff
path: root/networkx/utils/mapped_queue.py
Commit message (Collapse)AuthorAgeFilesLines
* Lint using Ruff (#6371)danieleades2023-02-191-2/+2
| | | | | | | | | | | | | | | * 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>
* Fix defect and update docs for MappedQueue, related to gh-5681 (#5939)Kevin Brown2022-10-041-12/+43
| | | | | | | | - 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>
* Allow greedy_modularity_communities to use floating point weights or ↵Dan Schult2021-09-071-99/+185
| | | | | | | | | | | | | | | | | | | resolution (#5065) * revise mapped_queue to separate priority from element * update max_modularity to use new mapped_queue * change attribute names h, d to heap, position in MappedQueue * clean up initialization of data structures and handling of q0 * change i,j,k notation to u,v,w (no indexes since gh-5007) * Update networkx/utils/mapped_queue.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Format w/ black==20.8b1Jarrod Millman2020-10-061-2/+1
|
* Format w/ blackJarrod Millman2020-07-101-1/+1
|
* Upgrade to Py36 syntaxJarrod Millman2020-01-011-2/+2
| | | | find networkx -name \*.py -exec pyupgrade --py36-plus {} \;
* Remove superfluous encoding informationJarrod Millman2019-11-111-1/+0
|
* Remove boiler plate from top of modulesJarrod Millman2019-11-111-13/+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.
* Add Clauset-Newman-Moore modularity-max community detection (#2871)Edward L Platt2018-02-281-0/+196
* Add greedy modularity maximization community detection. * Adds modularity_max module to networkx.algorithms.community package * Adds greedy_modularity_communities() function * Adds test using Zachary karate club network. * Add Clauset-Newman-Moore community detection. * Replace greedy_modularity_communities() with CNM implementation. * Add networkx.utils.mapped_queue used by the above implementation. * Add tests for networkx.utils.mapped_queue. * Add tests for naive modularity maximization. * Add TestNaive class. * Remove redundant modularity calculation. * Removes call to modularity() left over from debugging. Results in a significant speed-up. * Comply with pep8. * Update modularity_max module and tests for pep8. * Update mapped_queue module and tests for pep8. * Fix import of MappedQueue. * Add documentation for modularity_max module.