Skip to content

Abstract

AbstractGroup

Bases: ABC

Represents properties common to groups and subgroups.

Both groups and subgroups comprise people in known states of health.

Source code in june/groups/group/abstract.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class AbstractGroup(ABC):
    """Represents properties common to groups and subgroups.

    Both groups and subgroups comprise people in known states of health.

    """

    @property
    @abstractmethod
    def susceptible(self):
        """ """
        pass

    @property
    @abstractmethod
    def infected(self):
        """ """
        pass

    @property
    @abstractmethod
    def recovered(self):
        """ """
        pass

    @property
    @abstractmethod
    def in_hospital(self):
        """ """
        pass

    @property
    @abstractmethod
    def dead(self):
        """ """
        pass

    @property
    def size(self):
        """ """
        return len(self.people)

    @property
    def size_susceptible(self):
        """ """
        return len(self.susceptible)

    @property
    def size_infected(self):
        """ """
        return len(self.infected)

    @property
    def size_recovered(self):
        """ """
        return len(self.recovered)

dead abstractmethod property

in_hospital abstractmethod property

infected abstractmethod property

recovered abstractmethod property

size property

size_infected property

size_recovered property

size_susceptible property

susceptible abstractmethod property