Skip to content
Snippets Groups Projects
Commit cd928577 authored by Mark Penney's avatar Mark Penney
Browse files

Update Intervals_Model.py

parent 10e3a7a0
No related branches found
No related tags found
No related merge requests found
......@@ -53,13 +53,13 @@ def IntSample(N, Sparam, durlist):
# A function that takes an interval and returns the set of timesteps contained in it
def Coverage(S,E):
if S==E:
return set([S])
return set()
elif E < S:
SUP = [i for i in range(S, Durmax-1,1)]
EDOWN = [i for i in range(0, E+1)]
EDOWN = [i for i in range(0, E)]
return set(SUP + EDOWN)
else:
return set([i for i in range(S, E+1)])
return set([i for i in range(S, E)])
# Samples the total contact duration for a given number of and durations per contact
......@@ -72,7 +72,7 @@ def TotDurSample(N, Sparam, durlist):
S= Ints[i][j][0]
E = Ints[i][j][1]
Cov = Cov.union(Coverage(S,E))
out[i] = len(Cov)-1
out[i] = len(Cov)
return out
......
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