better bounds checking for get_times in boolean circuit
This commit is contained in:
parent
5d3e2ed354
commit
8f5035a9e3
1 changed files with 4 additions and 2 deletions
|
|
@ -33,8 +33,10 @@ def get_times(x, tau, lo=None, hi=None):
|
||||||
lo = min(v.first()[0] for v in x.values())
|
lo = min(v.first()[0] for v in x.values())
|
||||||
if hi is None or hi is oo:
|
if hi is None or hi is oo:
|
||||||
hi = max(v.last()[0] for v in x.values())
|
hi = max(v.last()[0] for v in x.values())
|
||||||
lo += tau
|
end = min(v.domain.end() for v in x.values())
|
||||||
hi += tau
|
hi = hi + tau if hi + tau <= end else end
|
||||||
|
lo = lo + tau if lo + tau <= end else end
|
||||||
|
|
||||||
if lo > hi:
|
if lo > hi:
|
||||||
return []
|
return []
|
||||||
elif hi == lo:
|
elif hi == lo:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue