Add a new singleton set containing the given element. Args: element: The element to add.
(self, element: object)
| 36 | self.count: int = 0 |
| 37 | |
| 38 | def add(self, element: object) -> None: |
| 39 | """Add a new singleton set containing the given element. |
| 40 | |
| 41 | Args: |
| 42 | element: The element to add. |
| 43 | """ |
| 44 | self.parents[element] = element |
| 45 | self.size[element] = 1 |
| 46 | self.count += 1 |
| 47 | |
| 48 | def root(self, element: object) -> object: |
| 49 | """Find the root representative of the set containing element. |
no outgoing calls
no test coverage detected