Adds an edge defined by vertices from source to destination then destination to source in matrix :param source: :param destination: :return:
(self, source, destination)
| 12 | self.adjacency_matrix.append([0] * vertices) |
| 13 | |
| 14 | def add_edge(self, source, destination): |
| 15 | """ |
| 16 | Adds an edge defined by vertices from source to destination |
| 17 | then destination to source in matrix |
| 18 | :param source: |
| 19 | :param destination: |
| 20 | :return: |
| 21 | """ |
| 22 | self.adjacency_matrix[source][destination] = 1 |
| 23 | self.adjacency_matrix[destination][source] = 1 |
| 24 | |
| 25 | def get_vertex(self): |
| 26 | """ |
no outgoing calls
no test coverage detected