diff --git a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py index 5d8c8c70627544fdcdc181adffa1b2663afd723a..6ecf299acd54e8e853181cca31e4fbcca14aea3e 100644 --- a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py +++ b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py @@ -670,9 +670,7 @@ class DimacsFrontierSol(object): """ # Frontier places # /!\ Most of the time spent in the constructor is due to this line - # Already a frozenset but this attribute must be immutable for __hash__, - # cast is a security. - self.frontier_values = frozenset(raw_sol.frontier_pos_and_neg_values) + self.frontier_values = raw_sol.frontier_pos_and_neg_values # Activated input/events (clocks) # Callable of raw_sol method (avoid to store raw_sol in this object) @@ -687,7 +685,11 @@ class DimacsFrontierSol(object): # - by FrontierSolution.from_dimacs_front_sol() # - to accelerate the call of self.nb_activated_frontiers # - as a criterion of uniqueness, to do set operations - self.activated_frontier_values = raw_sol.extract_activated_frontier_values() + # Already a frozenset but this attribute must be immutable for __hash__, + # cast is a security. + self.activated_frontier_values = frozenset( + raw_sol.extract_activated_frontier_values() + ) # Pre-compute nb of activated frontiers in the current solution # PS: use numpy to accelerate this ? The cast is costly...