diff --git a/cyaron/graph.py b/cyaron/graph.py index 9de2cc3..811316c 100644 --- a/cyaron/graph.py +++ b/cyaron/graph.py @@ -21,6 +21,12 @@ def __str__(self): """ return "%d %d %d" % (self.start, self.end, self.weight) + @staticmethod + def unweighted_edge(edge): + """unweighted_edge(edge) -> str + Return a string to output the edge without weight. The string contains the start vertex, end vertex(u,v) and splits with space. + """ + return '%d %d'%(edge.start,edge.end) class Graph: """Class Graph: A class of the graph