removed unused methods
This commit is contained in:
parent
f45ca3904d
commit
706c352392
1 changed files with 0 additions and 30 deletions
|
|
@ -304,36 +304,6 @@ class FormData:
|
|||
|
||||
if total_percentage != 100:
|
||||
raise ValueError(f'The sum of all respiratory activities should be 100. Got {total_percentage}.')
|
||||
|
||||
def merge_intervals(self, exposed_interval, infected_interval):
|
||||
stack = sorted(exposed_interval + infected_interval, reverse=True)
|
||||
while len(stack) > 1:
|
||||
first = stack.pop()
|
||||
second = stack.pop()
|
||||
if first == second: # identical intervals can be merged
|
||||
yield first
|
||||
elif first[1] <= second[0]: # no overlapping, yield first interval, put back second
|
||||
yield first
|
||||
stack.append(second)
|
||||
elif first[0] == second[0]: # overlap at start, yield shorter, put back rest of longer
|
||||
if first[1] > second[1]:
|
||||
first, second = second, first
|
||||
yield first
|
||||
stack.append((first[1], second[1]))
|
||||
elif first[1] < second[1]: # partial overlap, yield first two parts, put back rest
|
||||
yield first[0], second[0]
|
||||
yield second[0], first[1]
|
||||
stack.append((first[1], second[1]))
|
||||
else: # first[1] >= second[1] # total envelopment
|
||||
yield first[0], second[0]
|
||||
yield second
|
||||
if first[1] != second[1]:
|
||||
stack.append((second[1], first[1]))
|
||||
|
||||
yield from stack # there may or may not be one element left over
|
||||
|
||||
def merge_total_people(self):
|
||||
return self.total_people
|
||||
|
||||
def initialize_room(self) -> models.Room:
|
||||
# Initializes room with volume either given directly or as product of area and height
|
||||
|
|
|
|||
Loading…
Reference in a new issue