diff --git a/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py b/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py index 990c42b219b6fabe0845ec3223aecbe554a657ad..cd28e41874d50b86c6af1435104b86120ba9b6d9 100644 --- a/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py +++ b/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py @@ -582,7 +582,8 @@ class CLUnfolder(object): """ return self.__shift_direction - def get_shift_step(self): + @property + def shift_step(self): """ @return: the shift step ss (if n is X_0 code, n+ss is X_1 code) """ diff --git a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py index 4516e1200bdd611536018829ae2c0838502f4055..2d79218640bb2bfabd971061de1fb89677280a2c 100644 --- a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py +++ b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py @@ -133,7 +133,7 @@ class RawSolution(object): """ self.solution = solution self.unfolder = unfolder - self.shift_step = unfolder.get_shift_step() + self.shift_step = unfolder.shift_step self.current_step = unfolder.current_step self.shift_direction = unfolder.get_shift_direction() diff --git a/library/cadbiom/models/clause_constraints/mcl/TestCLUnfolder.py b/library/cadbiom/models/clause_constraints/mcl/TestCLUnfolder.py index 38655e7249581e6e939307cec71d1b987962b335..dfea5cf06fee6a947aa3e0850f279758f1eb6563 100644 --- a/library/cadbiom/models/clause_constraints/mcl/TestCLUnfolder.py +++ b/library/cadbiom/models/clause_constraints/mcl/TestCLUnfolder.py @@ -666,7 +666,7 @@ def init_forward_unfolding_solution_2(mcla): # Shift of the system clauses (and syst aux clauses) # The maximum value is now 48 since there is 47 literals assert unfolder.get_var_number() == 46 - assert unfolder.get_shift_step() == 47 + assert unfolder.shift_step == 47 expected = [ [[-24, 16], [-24, 4], [-16, -4, 24], [-15, 42], [-12, 42], [15, 12, -42], [-42, 41], [-11, 41], [42, 11, -41], [2, -40], [41, -40], [-2, -41, 40],