(self, g: Graph)
| 14 | self.add_self_loop = add_self_loop |
| 15 | |
| 16 | def augment(self, g: Graph) -> Graph: |
| 17 | if self._cache is not None and self.use_cache: |
| 18 | return self._cache |
| 19 | x, edge_index, edge_weights = g.unfold() |
| 20 | edge_index, edge_weights = compute_markov_diffusion( |
| 21 | edge_index, edge_weights, |
| 22 | alpha=self.alpha, degree=self.order, |
| 23 | sp_eps=self.sp_eps, add_self_loop=self.add_self_loop |
| 24 | ) |
| 25 | res = Graph(x=x, edge_index=edge_index, edge_weights=edge_weights) |
| 26 | self._cache = res |
| 27 | return res |
nothing calls this directly
no test coverage detected