We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a10bcb9 + ed595d5 commit a786315Copy full SHA for a786315
cyaron/graph.py
@@ -21,6 +21,12 @@ def __str__(self):
21
"""
22
return "%d %d %d" % (self.start, self.end, self.weight)
23
24
+ @staticmethod
25
+ def unweighted_edge(edge):
26
+ """unweighted_edge(edge) -> str
27
+ Return a string to output the edge without weight. The string contains the start vertex, end vertex(u,v) and splits with space.
28
+ """
29
+ return '%d %d'%(edge.start,edge.end)
30
31
class Graph:
32
"""Class Graph: A class of the graph
0 commit comments