metawards.mixers.merge_matrix_single_population

metawards.mixers.merge_matrix_single_population(network: Networks, nthreads: int, profiler: Profiler, **kwargs)

This merge_function merges the FOIs across all demographic sub-networks according to the interaction matrix stored in networks.demographics.interaction_matrix, using the total number of people across all demographics summed, so as to better model populations that mix completely. In this case, the different demographics are assumed to be in the same population and so have same probability of contact. The FOIs are merged together where they are divided by N (where N is the total number of individuals summed across all demographics), e.g.

N = N_i + N_j + N_k …

FOI_i = FOI_i / N + FOI_j / N + FOI_k / N …