Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added note of caution in minimum_spanning_tree(_parallel) #199

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pydatastructs/graphs/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ def minimum_spanning_tree(graph, algorithm):
==========

.. [1] https://en.wikipedia.org/wiki/Kruskal%27s_algorithm

Note
====

The concept of minimum spanning tree is valid only for
connected and undirected graphs. So, this function
should be used only for such graphs. Using with other
types of graphs may lead to unwanted results.
"""
import pydatastructs.graphs.algorithms as algorithms
func = "_minimum_spanning_tree_" + algorithm + "_" + graph._impl
Expand Down Expand Up @@ -337,6 +345,14 @@ def minimum_spanning_tree_parallel(graph, algorithm, num_threads):
==========

.. [1] https://en.wikipedia.org/wiki/Kruskal%27s_algorithm#Parallel_algorithm

Note
====

The concept of minimum spanning tree is valid only for
connected and undirected graphs. So, this function
should be used only for such graphs. Using with other
types of graphs will lead to unwanted results.
"""
import pydatastructs.graphs.algorithms as algorithms
func = "_minimum_spanning_tree_parallel_" + algorithm + "_" + graph._impl
Expand Down