mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
Removed Graphs and move prim.py to graphs (#872)
* Move prim.py from Graphs to graphs * Removed prim.py from Graphs * Update prim.py
This commit is contained in:
parent
0f229e0870
commit
ebe227c386
|
@ -28,7 +28,6 @@ class vertex():
|
||||||
"""
|
"""
|
||||||
Arguments:
|
Arguments:
|
||||||
id - input an id to identify the vertex
|
id - input an id to identify the vertex
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
neighbors - a list of the vertices it is linked to
|
neighbors - a list of the vertices it is linked to
|
||||||
edges - a dict to store the edges's weight
|
edges - a dict to store the edges's weight
|
||||||
|
@ -59,9 +58,7 @@ class vertex():
|
||||||
def prim(graph, root):
|
def prim(graph, root):
|
||||||
"""
|
"""
|
||||||
Prim's Algorithm.
|
Prim's Algorithm.
|
||||||
|
|
||||||
Return a list with the edges of a Minimum Spanning Tree
|
Return a list with the edges of a Minimum Spanning Tree
|
||||||
|
|
||||||
prim(graph, graph[0])
|
prim(graph, graph[0])
|
||||||
"""
|
"""
|
||||||
A = []
|
A = []
|
Loading…
Reference in New Issue
Block a user