Commit 12ed8f0b authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] Fix typos; fix doc

parent 21acce7d
......@@ -288,7 +288,8 @@ class CLUnfolder(object):
# ordered list of DIMACS codes of the frontier variables/places
self.frontier_values = [self.__var_code_table[frp] for frp in self.dynamic_system.frontiers]
## TODO: sort utile ici ???? si non passer en frozenset et supprimer les casts partout ailleurs
## TODO: Utiliser une liste triée est-il utile ici ?
## si non passer utiliser un frozenset et supprimer les casts partout
## Cf RawSolution.frontier_pos_and_neg_values BACKWARD, encore utilisé avec index
## Cf TestCLUnfolder.test_frontier indexable mais peut etre contourné
......@@ -1401,7 +1402,7 @@ class CLUnfolder(object):
In practice, it is a list with the values (Dimacs code)
of all frontier places of the system.
:type max_sol: <int>
:type vvars: <list <int>>
:type vvars: <list <int>> or <frozenset <int>> or any iterable
:return: A tuple of RawSolution objects
RawSolution objects contain a solution got from SAT solver with all
variable parameters from the unfolder
......@@ -1525,9 +1526,6 @@ class CLUnfolder(object):
variable parameters from the unfolder
:rtype: <tuple <RawSolution>>
if LOGGER.getEffectiveLevel() == DEBUG:
LOGGER.debug("squery_solve :: vvars : %s", vvars)
# Initialization
# Horizon adjustment
......@@ -246,8 +246,9 @@ class RawSolution(object):
frontiers (fixed size): 3824
solution (increasing size): 171231, 228314, 285405, 285453, 400091 etc.
@param sol: a dimacs solution
@return: a dimacs code list of the activation state on the frontier for sol
:return: A dimacs code set of the activation state on the frontiers for
the current solution.
:rtype: <frozenset <int>>
# Old API
# jmax = len(self.unfolder.frontier_values)
......@@ -305,9 +306,9 @@ class RawSolution(object):
j += 1
if j == jmax:
# all frontiers are found
return fsol
return frozenset(fsol)
frontier = frontiers[j]
return fsol # never reach this point
return frozenset(fsol) # never reach this point
# Useless proposition
# ps: jmax allows to stop the search when the iteration is made on solution
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment