Conversation
|
|
||
| if not hasattr(self, "_full_modularity_matrix"): | ||
| self._full_modularity_matrix = Network( | ||
| G, resolution=resolution, weight=weight, community=community | ||
| ).calculate_full_modularity_matrix() | ||
| network = Network( | ||
| G, | ||
| resolution=resolution, | ||
| weight=weight, | ||
| community=community, | ||
| full_modularity_matrix=self._full_modularity_matrix, | ||
| ) |
There was a problem hiding this comment.
Cool. However GurobiSampler needs it, as well. How about adding this code as a method to the abstract class (HierarchicalSampler)? As an optional method (without "@ abstractmethod") with default implementation?

By the way, I think self.weight can be saved as an attribute in AdvantageSampler and GurobiSampler, "community" would stay then as the only argument that isn't saved (cannot be) and is special. Self.weights can be saved I think.
| version: str | None = None, | ||
| region: str | None = None, |
There was a problem hiding this comment.
Here ok, but args "version" and "region" have gotten lost in Advantage in QHyper kacper3615/bug_fixing, they are not used there. Looks like a small mistake after refactoring. I added a comment in the PR in QHyper. Make sure nothing else got lost in Advantage after refactor ;)
No description provided.