r"""Format the hyperedge list. Args: ``e_list`` (``List[int]`` or ``List[List[int]]``): The hyperedge list.
(e_list: Union[List[int], List[List[int]]])
| 180 | |
| 181 | @staticmethod |
| 182 | def _format_e_list(e_list: Union[List[int], List[List[int]]]) -> List[List[int]]: |
| 183 | r"""Format the hyperedge list. |
| 184 | |
| 185 | Args: |
| 186 | ``e_list`` (``List[int]`` or ``List[List[int]]``): The hyperedge list. |
| 187 | """ |
| 188 | if type(e_list[0]) in (int, float): |
| 189 | return [tuple(sorted(e_list))] |
| 190 | elif type(e_list) == tuple: |
| 191 | e_list = list(e_list) |
| 192 | elif type(e_list) == list: |
| 193 | pass |
| 194 | else: |
| 195 | raise TypeError("e_list must be List[int] or List[List[int]].") |
| 196 | for _idx in range(len(e_list)): |
| 197 | e_list[_idx] = tuple(sorted(e_list[_idx])) |
| 198 | return e_list |
| 199 | |
| 200 | @staticmethod |
| 201 | def _format_e_list_and_w_on_them( |
no outgoing calls
no test coverage detected