Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9a0a4393 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

extract_act_inputs_clocks: Huge improvement: better algo

parent 3b5d0c63
No related branches found
No related tags found
Loading
......@@ -228,15 +228,15 @@ class RawSolution(object):
"""
extract active __inputs and clocks from a state vector
"""
out = []
for s_varcode in s_vector:
cond1 = s_varcode in self.__unfolder.get_inputs()
cond2 = s_varcode in self.__unfolder.get_free_clocks()
if cond1 or cond2:
if s_varcode > 0:
out.append(s_varcode)
return out
inputs = frozenset(self.__unfolder.get_inputs())
free_clocks = frozenset(self.__unfolder.get_free_clocks())
return [s_varcode for s_varcode in s_vector
if (s_varcode > 0)
and ((s_varcode in inputs)
or (s_varcode in free_clocks))]
def extract_act_input_clock_seq(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment