summaryrefslogtreecommitdiff
path: root/examples/algorithms
Commit message (Collapse)AuthorAgeFilesLines
* Add Greedy Coloring Example to Gallery (#6647)Vanshika Mishra2023-05-021-0/+35
| | | | | | | | | | | | | | | * plot_greedy_coloring_Example * suggestions incorporated * fix error * fixed error * Minor formatting tweaks. --------- Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Add Lowest Common Ancestor example to Gallery (#6542)Navya Agarwal2023-04-101-0/+48
|
* Fix typos (#6620)Harri Nieminen2023-04-041-1/+1
|
* Add community detection example to Gallery (#6526)Navya Agarwal2023-03-281-0/+79
| | | | | | | * Add community-detection example * Fix plot layout * Create subplot layout
* Update pre-commit (#6545)Jarrod Millman2023-03-232-2/+2
|
* Lint using Ruff (#6371)danieleades2023-02-193-15/+15
| | | | | | | | | | | | | | | * 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>
* Gallery example for Maximum Independent Set (#5563)stanyas2023-02-131-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update mayavi2_spring.py trial commit * Example map for GSoC * Changing errors in the example graph file * Rename example_map.py to example_map_2.py * style change to map code * Trial-map * Undo mayavi example change. * Mv example to gallery and use spx-gallery naming scheme. * Add docstring to MIS gallery example. * Simplify example. * Make node coloring more clear. --------- Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* DOC: Minor formatting fixups to get rid of doc build warnings. (#6363)Ross Barnowski2023-01-131-2/+2
| | | Minor formatting fixups to get rid of doc build warnings.
* Fix typos in the networkx codebase (#6335)Anurag Bhat2023-01-052-4/+4
| | | | | * Fix_Typos * Commit_Suggestions
* Remove deprecated function nx.info (#5759)Mridul Seth2022-06-211-1/+1
| | | | | | | | | | * 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 redundant py2 numeric conversions (#5661)Mridul Seth2022-05-311-1/+1
| | | | | | | | | * Remove redundant float conversion * Remove redundant int conversion * Use integer division Co-authored-by: Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
* Update black (#5438)Mridul Seth2022-03-291-1/+1
| | | | | | | * CI: sync up black dev requirements version with precommit * Run black Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* More numpy.matrix cleanups for NX2.7 (#5319)Ross Barnowski2022-02-121-1/+1
| | | | | | | | | | | | | | | | | | | * Fix return type in docstring of internal function. * Rm explicit mention of numpy matrix from class docstrings. * Fix return type of floyd_warshall_numpy docstring. * Remove mention of numpy matrix from code comment. * Fix simrank similarity internal docstring. * Rm explicit mention of matrix in favor of 2D array. * Update to_networkx_graph array exception wording. * Remove extraneous mention of numpy matrix. * Don't print array in exception message.
* Touchups and suggestions for subgraph gallery example (#5225)Ross Barnowski2021-12-171-109/+21
| | | | | | | | | | | | | | | * 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.
* [MRG] Create plot_subgraphs.py example (#5165)Andrew Knyazev2021-12-121-0/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fixes #4275 - Add comment to parallel betweenness example (#4926)Alex Korbonits2021-06-281-1/+5
| | | | | | | * Add comment about single core CI/CD showing slower parallel output in example script. * less specific estimate of speedup Co-authored-by: Dan Schult <dschult@colgate.edu>
* adds implementation of SNAP summarization algorithm (#4463)Douglas Fenstermacher2021-05-171-0/+108
| | | | | | | | | | | * adds implementation of SNAP summarization algorithm Thanks to dschult and rossbar for many much-needed recommendations for refining and optimizing the implementation * Seed layouts for snap gallery examples. Make sure the layouts are reproducible. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Collect graphviz examples (#4427)Jarrod Millman2020-12-071-42/+0
| | | | | | | * Collect graphviz examples * Sort examples by file name * Improve graphviz gallery layout
* Remove advanced example section (#4429)Jarrod Millman2020-12-062-0/+288
|
* Refactor gallery (#4422)Jarrod Millman2020-12-064-13/+114
| | | | | | | | | | | | | | | * Add external directory * Move Javascript and JIT * Remove application section * Consolidate and move pygraphviz examples * Clean up imports * Reorder * Fix subclass examples
* Add plot for rcm example (#4411)Jarrod Millman2020-12-031-4/+10
|
* Add gene-gene network (#4269)Jarrod Millman2020-11-242-0/+78819
|
* Sphinx33 (#4342)Jarrod Millman2020-11-121-2/+2
| | | | | * Update sphinx * Cleanup sphinx warnings
* adds dedensification function (#4240)Douglas Fenstermacher2020-11-091-0/+93
| | | | | | | * adds dedensification function, documentation, and examples * rm unnecessary lines. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Improve axes layout in plot_decomposition example (#4278)Ross Barnowski2020-10-241-10/+12
| | | | | | | * Fix axis layout and padding for decomposition fig. * More vertical aspect ratio. * Remove unnecessary imports.
* Add seeds to gallery examples for reproducibility (#4276)Ross Barnowski2020-10-244-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Seed layout basic/plot_properties. * Seed simple path example * Switch node cmap example to deterministic layout * Seed layout in edge_colormap example * Seed graph gen and layout in ego_graph example * Seed random_geometric_graph example. * Seed layout and pad axes w/ tight_layout. * Seed and modify colors for directed example. * Seeded graph gen and layout * Switch to plasma colormap for better contrast on light bgnd * Seed layout and tight_layout sampson example * Seed and pad axes for unix email example * Seed graph gen and layout for erdos_renyi example * Seed graph gen and layout of degree_seq example * Seed layout of football example * Seed layout for krackhardt centrality example * Seed davis club example * Seed and use np alias in blockmodel example * Seed beam search example. * Seed random graph in eigenval example * Seed heavy metal layout and pad axes * Use deterministic layout for rgraph example * Seed layout for printgraph example. * Add seed to antigraph example. * Use single rng seed value. For examples with multiple uses of rng's (e.g. one for generating a random graph, and another for layout) use a single integer value as the seed for both. * Remove unnecessary submodule paths from examples.
* junction_tree for #1012 (#4004)Matthias Bruhns2020-08-151-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit. * Fixed PEP 8 issues. * Fixed more PEP 8 issues. * Added type to sepset-nodes. * Moved file to networkx/algorithms/tree, changed name of module to avoid namespace collision, added entry to doc system, changed deepcopy to list, removed check for None, shifted to G.is_directed(), added example. * Removed example code. * Removed unused import statement. * Moved notes section. * Fixed PEP 8 issues and removed old file. * Fixed PEP 8 issues. * Formatting with Black, added docstring to example and removed license information. * Added name to name of contributors. * Ran black i.e., black networkx/algorithms/tree/tests/test_junction_tree_algorithm.py * Updated explanation of junction trees, removed 'Graph' from unsupported classes. * DOC: tweaks to docstring. * Changed naming and updated docstring/code according to suggestions. * Removed old files. * Updated doc and init. * Minor tweaks in docs and import structure * Improve example Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu>
* Handle kwds explicitly in draw_networkx (#4033)Jeremias Traub2020-07-051-1/+1
| | | | | | | * Handle kwds explicitly in draw_networkx; fix kwds in examples * fix PEP8 issues Fixes #4020
* Update examplesJarrod Millman2019-11-115-85/+74
|
* Remove deprecated from examplesDan Schult2019-10-121-1/+1
|
* Ensure sphinx-gallery tries running all the examplesJarrod Millman2019-04-042-0/+0
| | | | It only runs scripts starting w/ plot_ by default.
* Update copyrightJarrod Millman2019-03-303-3/+3
|
* link DOIs to preferred resolver (#2879)Katrin Leinweber2018-02-231-1/+1
|
* Update copyrightJarrod Millman2018-01-203-3/+3
|
* Fix examples (#2606)Jarrod Millman2017-08-121-2/+2
| | | Changes due to PR #2604
* Remove blockmodel deprecated in 2015Jarrod Millman2017-07-251-2/+2
| | | | See PR #1886 and 9b7194788.
* Refactor examples (#2527)Jarrod Millman2017-07-215-24/+22
| | | | | | | | | | | | * Fix unix_email and plot more examples * Fix doctest * Fix more examples * Fix AntiGraph.degree generator error in examples * Style/consistency changes and plot more examples
* Flatten doc hierarchy (#2520)Jarrod Millman2017-07-171-14/+14
| | | | | | | | * Silence some sphinx warnings * Update structure of documentation See https://github.com/networkx/networkx/pull/2054
* Fix sphinx (#2517)Jarrod Millman2017-07-176-58/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ensure valid rst file * Edit text * Update README and package docstring * Add myself as a contributor * Update gitwash * Fix warnings/errors except citations/footnotes * Remove old note about 3.0 incompatibility * Remove stale ref to gh-pages * Create top-level tools directory (standard practice) * Use sphinx-gallery extension for examples * Sphinx-gallery generates images for `plot_` examples * Comply with pep8 * Don't save figures
* Corrects logarithm base in examplebeam-log-2jfinkels2016-07-051-1/+3
|
* Adds beam search traversal algorithm with exampleJeffrey Finkelstein2016-05-161-0/+100
| | | | | | | | | | | This commit adds the generalization of breadth-first search known as "beam search", in which only a subset of "good" neighbors are enqueued when visiting a new node. This refactors the breadth-first search functions to call a generic BFS helper function that allows an arbitrary successors function. This also adds an example application, which is the progressive widening beam search.
* Adjusts imports in drawing with graphviz for v2.0Dan Schult2016-01-113-20/+15
| | | | | Also adjusts examples and docs Cherry-pick from #1930
* minor changes related to _iter removalDan Schult2015-08-071-1/+1
| | | | | | Mostly doc string tweaks for graph classes, tutorial. Fixes of blockmodel and antigraph examples api_changes and release_2.0 updates.
* Adds missing parentheses to Davis club examplejfinkels2015-02-051-2/+2
|
* Simplify Davis Club exampleAric Hagberg2015-01-121-146/+26
| | | | Keep track of ordering in davis club and show how to use one-mode projections.
* Adapt print statements in examples for Python 3 compatibilityysitu2014-06-251-3/+3
|
* Update cuthill-mckee ordering with docs and example.Aric Hagberg2011-09-241-24/+24
| | | | Addresses #530
* Move reverse Cuthill-McKee algorithm to utils.Aric Hagberg2011-09-211-77/+26
| | | | | | | | Adjust example. Addresses #530 --HG-- rename : examples/algorithms/rcm.py => networkx/utils/rcm.py
* Add Cuthill McKee example.Aric Hagberg2011-09-171-0/+83
| | | | Fixes #530
* Change to ascii text fileAric Hagberg2011-09-091-337/+337
|