Adds an edge in the format [first, second, edge weight] to graph.
(self, u_node: int, v_node: int, weight: int)
| 47 | self.m_component: dict[int, int] = {} |
| 48 | |
| 49 | def add_edge(self, u_node: int, v_node: int, weight: int) -> None: |
| 50 | """Adds an edge in the format [first, second, edge weight] to graph.""" |
| 51 | |
| 52 | self.m_edges.append([u_node, v_node, weight]) |
| 53 | |
| 54 | def find_component(self, u_node: int) -> int: |
| 55 | """Propagates a new component throughout a given component.""" |