Propagates a new component throughout a given component.
(self, u_node: int)
| 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.""" |
| 56 | |
| 57 | if self.m_component[u_node] == u_node: |
| 58 | return u_node |
| 59 | return self.find_component(self.m_component[u_node]) |
| 60 | |
| 61 | def set_component(self, u_node: int) -> None: |
| 62 | """Finds the component index of a given node""" |
no outgoing calls
no test coverage detected