r"""Load the DHG's hypergraph structure from a file. Args: ``file_path`` (``Union[str, Path]``): The file path to load the DHG's hypergraph structure.
(file_path: Union[str, Path])
| 69 | |
| 70 | @staticmethod |
| 71 | def load(file_path: Union[str, Path]): |
| 72 | r"""Load the DHG's hypergraph structure from a file. |
| 73 | |
| 74 | Args: |
| 75 | ``file_path`` (``Union[str, Path]``): The file path to load the DHG's hypergraph structure. |
| 76 | """ |
| 77 | file_path = Path(file_path) |
| 78 | assert file_path.exists(), "The file does not exist." |
| 79 | with open(file_path, "rb") as fp: |
| 80 | data = pickle.load(fp) |
| 81 | assert data["class"] == "Hypergraph", "The file is not a DHG's hypergraph file." |
| 82 | return Hypergraph.from_state_dict(data["state_dict"]) |
| 83 | |
| 84 | def draw( |
| 85 | self, |
nothing calls this directly
no test coverage detected