Returns string representation of the graph
(self)
| 55 | self.adjacency[tail][head] = weight |
| 56 | |
| 57 | def __str__(self): |
| 58 | """ |
| 59 | Returns string representation of the graph |
| 60 | """ |
| 61 | string = "" |
| 62 | for tail in self.adjacency: |
| 63 | for head in self.adjacency[tail]: |
| 64 | weight = self.adjacency[head][tail] |
| 65 | string += f"{head} -> {tail} == {weight}\n" |
| 66 | return string.rstrip("\n") |
| 67 | |
| 68 | def get_edges(self): |
| 69 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected