def main():
    #print(np.full([5, 5], None))

    print("Prim's Algorithm")
    g = Graph(5)
    g.create_graph_with_edges(7)
    #g.create_graph_with_edges()
    g.make_adjacency_matrix()
    print(g.temp_array)
    g.temp_array[:, 3] = None  # Change All Values of a Certain Columnn
    print(g.temp_array)
Exemple #2
0
def main():
    g = Graph(int(input("Enter Number Of Nodes of Your Graph: ")))
    g.create_graph_with_edges(int(
        input("Enter The Number Of Edges : ")))  # Take The Graph Input
    g.sort_edges_by_value()  # Sort The Edges By Weight
    krushkal_algo(g)