text:
\section{Introduction\label{sec:intro}}
The modelling of infectious disease transmission has a long history in mathematical biology, but in recent years it gained an increasing influence on the theory and practice of disease management and control, see e.g.~\cite{AM1991,Brauer2017,Dieketal2013,He2000,Keelingetal2008}. Most epidemiological models are compartmental models, with the population divided into classes and with assumptions about the rate of transfer from one class to another. In this paper, we focus on a \emph{Susceptible-Exposed-Infectious-Removed} (SEIR) \emph{model} describing the disease transmission and the rate of infected individuals. There are several versions of the scalar SEIR model, and for the mathematical treatment, we refer, for instance, to Hethcote~\cite{He2000}, Keeling and Rohani~\cite{Keelingetal2008}, among others. The basic idea of the SEIR model is to describe the number of infected and recovered individuals based on the number of contacts, probability of disease transmission, incubation period, and recovery and mortality rate. Since the model focuses on a very short time, it postulates that births and natural (i.e., not connected with the epidemics) deaths balance each other.

In this paper, we consider metapopulation models, where the population is partitioned into subpopulations. In particular, we model large, spatially segregated sub-populations. Note that a similar approach could be used in a more general way, irrespective of the biological interpretation: different ages, small interacting communities, and so on~\cite{Eubanketal2004,Vespignanietal2015,Newman2002}. This framework has traditionally provided an attractive approach to incorporating more realistic contact structures into epidemic models since it often preserves analytic tractability but also captures the most salient structural inhomogeneities in contact patterns that one faces in many applications.

Understanding the dynamics of coupled systems on graphs modelling connectivity in real-life systems can be quite challenging. On the other hand, one is often interested in the analysis of average quantities over large networks. In recent years, several authors have developed new powerful techniques to describe and analyse the structure of large graphs, see in particular~\cite{LS07}. Many nontrivial graph sequences, which are of interest in applications, have relatively simple limits, described by symmetric measurable functions on a unit square, called \emph{graphons}. In particular, information on the asymptotic distribution of social contacts can be encoded in the theory of graphons to obtain continuum models that approximate the dynamics over graphs with a large number of nodes. We point out that the model we consider in the present paper does not take into account some relevant factors, like the presence of asymptomatic individuals that have a prominent role in disease transmission. These model improvements are the objects of possible future work.

The exposition is organised as follows. In Sect.~\ref{sec:PF} we introduce the SEIR model on a graph and its main properties. Our main goal is to understand the interplay between the transmission of the disease and the distribution of contacts. In Sect.~\ref{sec:spectra}, we estimate the spectrum of the weighted adjacency matrix involved in the dynamical model. As the results in Sect.~\ref{sec:PF}, we show this geometric parameter has a prominent role in the asymptotic behaviour of the epidemic. In Sect.~\ref{sec:graphon}, we derive the continuum limit of compartmental epidemiological models on graphs based on a suitable asymptotic procedure, which relies on the notion of graphon. Then, we investigate the relations between the solutions of the graphon-based asymptotics and the SEIR dynamical system on a suitable graph. In the numerical experiments, following the detailed analysis performed in~\cite{Beraudetal2015}, the number of social contacts in the population is described by a Gamma distribution.

\section{Problem formulation: SEIR model on graphs\label{sec:PF}}
When investigating the transmission of infectious diseases, the analysis of the average behaviour of a large population is sufficient to provide useful insight and extract valuable information from the input data. However, the importance of the spatial component of many transmission systems is being increasingly recognised~\cite{Vespignanietal2015}. It is then important to rely on models that represent space in some way. The main approaches for spatial models concern different scales: an individual-based simulation, a meta-population model, or a network model. Individual-based models explicitly represent every individual and usually assume a variable probability that any infectious host can infect any other susceptible host. Conversely, in the meta-population models, one keeps track of the number of individuals at different space locations that are in some states. These models often assume that each location is connected to others, with possible variable strengths of connection.

To describe a mathematical model for the spread of infectious disease, one has to make some assumptions about the disease transmission. We consider here, as a basic model, the SEIR compartmental model where individuals are classified into different population groups based on the infection status. The model tracks the number of people in each of the following categories: \emph{Susceptibles} (individuals that may become infected), \emph{Exposed} (individuals that have been infected with a pathogen, but due to the pathogen incubation period, are not yet infectious), \emph{Infectious} (individuals that are infected with a pathogen and may transmit it to others), and \emph{Recovered} (individual that is either no longer infectious or has been ``removed'' from the population). Indeed, we consider diseases with a latent phase during which the individual is infected but not yet infectious: a recent example of the application of this type of model is the description of the transmission of the COVID-19 disease~\cite{Heetal2020}.

In the scalar case, the total (initial) population,~$N$, is categorised into four classes, namely,~$s(t)$ (susceptible),~$e(t)$ (exposed),~$i(t)$ (infected-infectious), and~$r(t)$ (recovered), where~$t$ is the time variable. The basic assumption for the scalar model is the homogeneously mixing population hypothesis which, roughly speaking, means that a given infectious individual may transmit the disease to any susceptible individual at the same rate. Also, one postulates that all the individuals in the population have the same chances of interacting with each other. People move from \texttt{S} to \texttt{E} based on the number of contacts with \texttt{I} individuals, multiplied by the probability of infection~$\beta$, where~$\beta i(t)/N$ is the average number of contacts with infection per unit time of one susceptible person. The other processes taking place at time~$t$ are: the exposed \texttt{E} become infectious \texttt{I} with a rate~$\mu$ and the infectious recover \texttt{R} with a rate~$\gamma$. Recovered individuals do not flow back into the \texttt{S} class, as lifelong immunity is postulated. The fractions~$1/\mu$ and~$1/\gamma$ are the average disease incubation and infectious periods, respectively. We assume that the total population remain constant, i.e., ~$s(t)+e(t)+i(t)+r(t)=N$. Next, we consider the rescaled variables, which for simplicity we do not relabel, ~$s(t)/N \rightarrow s(t)$,~$e(t)/N \rightarrow e(t)$, ~$i(t)/N \rightarrow i(t)$,~$r(t)/N \rightarrow r(t)$. The ordinary differential equations (ODEs) governing the SEIR model are then
\[ \left\{
\begin{array}{l}
\displaystyle
\dot{s}(t)=-\beta\, s(t)i(t)\\
\displaystyle
\dot{e}(t)= \beta\, s(t)i(t) - \mu e(t) \\
\displaystyle
\dot{i}(t)=\mu e(t) -\gamma i(t) \\
\displaystyle
\dot{r}(t)=\gamma i(t)
\end{array} \right.
\]
In the present work, we consider a meta-population model. We consider a network that is represented by a \emph{simple graph}~$\mathcal{G}=(V,E)$ with~$n$ vertices (nodes, regions, patches) and~$m$ edges (connections). Each edge is described by a couple of nodes~$(u,v)$,~$u,v\in V$. We order the nodes and label them with an integer index. Let~$\tilde A=(\tilde a_{ij})$ be the adjacency matrix of the graph:
\[
\tilde a_{ij}=\left\{
\begin{array}{l}
 1\,\,\,\text{if }(i,j)\text{ is an edge,}\\
 0\,\,\,\text{otherwise.}
\end{array}
\right.
\]
\begin{rem} In the rest of this section, we focus on an undirected graph and a symmetric adjacency matrix. One could also assume that the entries of the matrix belong to the interval~$[0,1]$, thus obtaining a weighted graph, where the weights of the edges represent the probability of contact between the sub-populations in the connected nodes. In this way, a lockdown or a travel restriction policy could be simulated. Furthermore, one could consider weights varying over time, thus taking into account a variable topology of the graph underlying the dynamical system. The following analysis can be easily adapted to these cases.
\end{rem}
We denote by ~$(s_j(t),\, e_j(t),\,i_j(t),\,r_j(t))$ the percentage of susceptible, infected, removed at time~$t$ at the node~$j$. At each node~$j$, the size of the groups is normalised to the number~$N_j$ of individuals associated with that node. Note that~$\sum_j N_j=N$, where~$N$ is the size of the whole population. The \emph{$SEIR$ model} on a general simple graph reads (in component-wise form)
\begin{equation}
\label{eq:SIRgraph2} \left\{
\begin{array}{l}
\displaystyle
\dot{s}_j(t)=-\beta\, s_j(t) \sum_{k=1}^{n} \tilde a_{jk}i_k(t)-\beta\, s_j(t) i_j(t) \\
\displaystyle
\dot{e}_j(t)=\beta\, s_j(t) \sum_{k=1}^{n} \tilde a_{jk}i_k(t)+\beta\, s_j(t) i_j(t) -\mu e_j(t) \\
\displaystyle
\dot{i}_j(t)= \mu e_j(t)-\gamma i_j(t), \phantom{\sum_{k=1}^{n}}\\
\displaystyle
\dot{r}_j(t)= \gamma i_j(t),
\end{array} \right.
\end{equation}
where~$\beta$ and~$\gamma$ are constant rates. Owing to the classical Cauchy Lipschitz Picard Lindel\"of Theorem, the Cauchy problem obtained by coupling system~\eqref{eq:SIRgraph2} with the initial data
\begin{equation} \label{eq:idata}
 s_j(0) = s_{j0}, \quad e_j(0)= e_{j0}, \quad i_j(0) = i_{j0}, \quad r_j(0) = r_{j0}, \quad
 \text{for every~$j=1, \dots, n$}
\end{equation}
has a local in-time solution. Since~$s_j, e_j, i_j, r_j$ represent percentages of individuals, the modelling meaningful range is
\begin{equation}
\label{eq:range}
 0 \leq s_j(t), e_j(t), i_j(t), r_j(t) \leq 1, \quad
 s_j(t)+ e_j(t)+ i_j(t)+ r_j(t) =1,
\end{equation}
for every~$ t \ge 0$ and every~$j=1, \dots, n$.
The next result states that the solution of~\eqref{eq:SIRgraph2} does indeed attain values in the above range.
\begin{Lem}\label{l:bounds
Assume that~$0 \leq s_{j0}, e_{j0}, i_{j0}, r_{j0} \leq 1$ and~$s_{j0}+ e_{j0}+ i_{j0}+ r_{j0}=1$, for every~$j=1, \dots, n$. Then the solution of the Cauchy problem obtained by coupling~\eqref{eq:SIRgraph2} with~\eqref{eq:idata} is global in time and satisfies~\eqref{eq:range}.
\end{Lem}
\begin{proof}
To establish the second condition in~\eqref{eq:range} it suffices to observe that~$\dot{s}_j (t)+ \dot{e}_j (t)+ \dot{i}_j (t)+ \dot{r}_j (t)=0$ for every~$j=1, \dots, n$. We recall that, if the solution is bounded, then it can also be extended for every~$t \ge 0$. This implies that, to conclude the proof of the lemma, it suffices to show that~$s_j(t), e_j(t), i_j(t), r_j(t) \ge 0$ for every~$t$ and every~$j=1, \dots, n$. By the continuous dependence of solutions of ODEs on parameters, it suffices to establish the same property for the family of perturbed systems
\begin{equation*}
\label{eq:SIRgraph3} \left\{
\begin{array}{l}
\displaystyle
\dot{s}^\varepsilon_j(t)=-\beta\, s^\varepsilon_j(t) \sum_{k=1}^{n} \tilde a_{jk}i^\varepsilon_k(t)-\beta\, s^\varepsilon_j(t) i^\varepsilon_j(t) \\
\displaystyle
\dot{e}^\varepsilon_j(t)=\beta\, s^\varepsilon_j(t) \sum_{k=1}^{n} \tilde a_{jk}i^\varepsilon_k(t)+\beta\, s^\varepsilon_j(t) i^\varepsilon_j(t) -\mu e^\varepsilon_j(t) + \varepsilon \\
\displaystyle
\dot{i}_j(t)= \mu e^\varepsilon_j(t)-\gamma i^\varepsilon_j(t) + \varepsilon, \phantom{\sum_{k=1}^{n}}\\
\displaystyle
\dot{r}_j(t)= \gamma i^\varepsilon_j(t),
\end{array} \right.
\end{equation*}
where~$\varepsilon>0$ is a parameter converging to~$0^+$. First, we observe that, if~$s^\varepsilon_j(t)=0$ for some~$t$, then~$\dot{s}^\varepsilon_j(t)=0$. By the uniqueness part of the Cauchy Lipschitz Picard Lindel\"of Theorem, this implies that~$s^\varepsilon_j(t) \equiv 0$ if~$s^\varepsilon_j(0)=0$ and hence that~$s^\varepsilon_j(t) > 0$ for every~$t$ if~$s_{j0} > 0$.
Next, we set
$$
 \bar t_\varepsilon : = \min \{ t \ge 0: \; e^\varepsilon_j( t) =0 \; \text{or} \; i^\varepsilon_j (t) =0 \; \text{for some~$j =1, \dots, n$} \}
$$
and we separately consider the following cases. If there is~$j=1, \dots, n$ such that~$e^\varepsilon_j (\bar t_\varepsilon) =0$, then, since~$s^\varepsilon_j (\bar t), i^\varepsilon_j (\bar t_\varepsilon) \ge0$, we have~$\dot{e}^\varepsilon_j (\bar t_\varepsilon) \ge \varepsilon$ and hence~$\bar t_\varepsilon=0$ and~$e^\varepsilon_j >0$ in a left neighborhood of~$0$. If there is~$j=1, \dots, n$ such that~$i^\varepsilon_j (\bar t_\varepsilon) =0$, then~$\dot{i}^\varepsilon_j (\bar t_\varepsilon) \ge \varepsilon$ and hence~$\bar t_\varepsilon=0$ and~$i^\varepsilon_j >0$ in a left neighborhood of~$0$. This implies that~$0 \leq s^\varepsilon_j(t), e^\varepsilon_j(t), i^\varepsilon_j (t)$ for every~$t\ge 0$. Since~$\dot{r}_j^\varepsilon \ge 0$, then~$r^\varepsilon_j (t) \ge 0~$ for every~$t\ge 0$. By letting~$\varepsilon \to 0^+$, we conclude the proof of the lemma.
\end{proof}
In the following, we adopt the notation~$ 1 =[1\,1\,\ldots ,1]^{\top}$,~$ 0 =[0,\,0,\,\ldots ,0]^{\top}$ and, for any vectors~$x,\, y\in \mathbb{R}^n$, we write~$x<<y\,\Leftrightarrow x_i < y_i\,i=1,2,\ldots ,n$,~$x\leq y \,\Leftrightarrow x_i \leq y_i\,i=1,2,\ldots ,n$ and~$x<y$ if~$x\leq y$ but~$x\neq y$. The asymptotic behaviour of system~\eqref{eq:SIRgraph2} is described by the following lemma.
\begin{Lem}\label{Teo:seir1}
Consider the SEIR system~\eqref{eq:SIRgraph2}, then the equilibrium points are~$P_\infty =(S_\infty ,\, 0 ,\, 0 ,\,R_\infty )$. Also, consider the Cauchy problem obtained by coupling~\eqref{eq:SIRgraph2} with~\eqref{eq:idata}. Under the same assumptions as in Lemma~\ref{l:bounds}, every trajectory converges to an equilibrium point~$P_\infty =(S_\infty ,\, 0 ,\, 0 ,\,R_\infty )$ with~$S_\infty^{\top} 1 +R_\infty^{\top} 1 =1$.
\end{Lem}
\begin{proof}
Let~$(S, E, I, R)$ be an equilibrium point. From the fourth equation in~\eqref{eq:SIRgraph2}, we conclude that~$i_j=0$ for every~$j=1, \dots, n$. By plugging this equality in the third equation of~\eqref{eq:SIRgraph2}, we conclude that~$e_j=0$ for every~$j=1, \dots, n$. This implies that the equilibria are in the form~$P_\infty =(S_\infty ,\, 0 ,\, 0 ,\,R_\infty )$. We are left to prove the second part of the lemma. We recall Lemma~\ref{l:bounds} and by using the fourth equation in~\eqref{eq:SIRgraph2} we conclude that, for every~$j=1, \dots, n$, the function~$r_j$ is monotone non decreasing and hence has a limit as~$t \to + \infty$. Also, the limit is confined between~$0$ and~$1$. By adding the third and the fourth equation in~\eqref{eq:SIRgraph2} we get that ~$i_j + r_j$ is monotone non decreasing and also have a limit as~$t \to + \infty$. We conclude that~$i_j$ has a limit as~$t \to + \infty$. By using the first equation in~\eqref{eq:SIRgraph2} we infer that, for every~$j=1, \dots, n$,~$s_j$ is monotone non-increasing and hence has a limit, which is confined between~$0$ and~$1$, as~$t\to + \infty$. By adding the first and the second equation in~\eqref{eq:SIRgraph2} we get that, for every~$j=1, \dots, n$, ~$s_j + e_j$ is monotone non increasing and hence has a limit as~$t \to + \infty$. We eventually conclude that~$e_j$ has a limit for~$t\to + \infty$. Since the limit point is finite, it must be an equilibrium. The condition~$S_\infty^{\top} 1 +R_\infty^{\top} 1 =1$ follows from the equality~$s_j (t) + e_j(t) + i_j (t) + r_j (t) =1$ for every~$j=1, \dots, n$ and~$t \ge 0$.
\end{proof}
We now focus on the transient behaviour of system~\eqref{eq:SIRgraph2}. To this end, we introduce the matrix formulation
\begin{equation}\label{eq:SEIR:graph} \left\{
\begin{array}{l}
\dot{S}(t) =-\beta\, diag(S(t)) A I(t) \\
\dot{E}(t) = \beta\, diag(S(t)) A I(t) - \mu E(t) \\
\dot{I}(t) = \mu E(t) - \gamma I(t) \\
\dot{R}(t) = \gamma I(t)
\end{array} \right.
\end{equation}
where
\[
S(t)=\left(
\begin{array}{c}
 s_1(t) \\
 s_2(t) \\
 \vdots \\
 s_n(t)
\end{array}
\right),\,
E(t)=\left(
\begin{array}{c}
 e_1(t) \\
 e_2(t) \\
 \vdots \\
 e_n(t)
\end{array}
\right), \,\,
I(t)=\left(
\begin{array}{c}
 i_1(t) \\
 i_2(t) \\
 \vdots \\
 i_n(t)
\end{array}
\right), \,\,
A=\tilde A+I_n,
\]
where~$I_n$ is the~$n-$dimensional identity matrix, and ~$diag(S(t))$ is a diagonal matrix with main diagonal equal to the vector~$S(t)$.

If~$S(t) \ge 0$, then the matrix~$B(t)=diag(S(t))\,A$ is a non-negative, irreducible matrix. Owing to the Perron-Frobenius Theorem~\cite{FC1997}, this implies that~$B (t)$ has a positive eigenvalue, which we denote by~$\lambda_M (t)=\rho (B(t))$, equal to the spectral radius. Also, there is an associated positive eigenvector, which we denote by~$V_M(t)>>0$. Note that, if~$S(t) \to 0$, then~$\lambda_M(t) \to 0$. The next result focuses on the transient behaviour of the solutions of~\eqref{eq:SEIR:graph}.
\begin{Thm}\label{Teo:seir2}
Consider system~\eqref{eq:SEIR:graph}, let~$\lambda_M (t)$ be the dominant eigenvalue of~$B(t)$ and~$V_M(t)>>0$ the corresponding positive left eigenvector.
\begin{itemize}
\item[(1)] Assume that for some~$\tau\geq 0$ we have~$\beta \lambda_M(\tau )\leq \gamma$ then~$q_\tau (t)=V_M(\tau )^{\top}\, (E(t)+I(t))$ is monotonically decreasing to~$0$ on~$[\tau, + \infty[$.
\item[(2)] Assume that~$\beta \lambda_M (\tau) > \gamma$ for some~$\tau \ge 0$, then there is~$ t^*>\tau$ such that~$q_\tau(t)= V_M(\tau )^{\top}\,(E(t)+I(t))$ is monotone non decreasing on~$[\tau ,t^*[$.
\item[(3)] If the limit point of the trajectory under consideration is~$(0, 0, 0, 1)$, then there is~$\tau >0$ such that~$\beta \lambda_M (\tau) \leq \gamma$ and
item (1) applies.
\end{itemize}
\end{Thm}
\begin{proof}
We first establish point (1). By multiplying the sum of the second equation and the third equation in~\eqref{eq:SEIR:graph} by~$V_M(\tau )$ we get
\[
V_M (\tau)^{\top} \left[ \dot{E}(t)+ \dot{I}(t)\right] = V_M (\tau)^{\top} (\beta\, diag(S(t)) A I(t) - \gamma I(t)).
\]
Since~$S(t)$ is monotone non increasing (see the proof of Lemma~\ref{Teo:seir1}), then~$$V_M (\tau)^{\top} (\beta\, diag(S(t)) \leq V_M (\tau)^{\top} (\beta\, diag(S(\tau))$$ for every~$\tau \ge t$. This yields
\[
\frac{d\,V_M (\tau)^{\top} (E(t) +{I}(t))}{dt}\leq V_M (\tau)^{\top} (\beta\, diag(S(\tau )) A I(t) - \gamma I(t)),\,\,t\geq \tau .
\]
Since~$V_M (\tau)^{\top} (\beta\, diag(S(\tau )) B)=\lambda_M (\tau) V_M (\tau)^{\top}$, then
\[
\frac{d\,V_M (\tau)^{\top} ({E}(t)+I(t))}{dt}\leq \left( \beta \lambda_M(\tau ) -\gamma \right)V_M (\tau)^{\top} I(t)
\leq 0.
\]
To establish the last inequality we have used the inequalities~$\left( \beta \lambda_M(\tau ) -\gamma \right)\leq 0$,~$V_M>>0$, and~$I(t)\ge 0$. The above inequality implies that~$V_M (\tau)^{\top} ({E}(t)+I(t))$ is monotone non increasing on~$[\tau, + \infty[$, and henceforth converging as~$t \to + \infty$. Owing to Lemma~\ref{Teo:seir1}, the limit is~$0$. To establish point (2), it suffices to point out that, if~$\beta \lambda_M (\tau) > \gamma$, then
$$
\frac{d}{dt}\left( V_M(\tau )^{\top} (E(t)+I(t)) \right)_{t=\tau}
\ge 0 .
$$
To establish point (3), we point out that, if~$S(t)$ converges to~$0$, then~$\lambda_M (t)$ converges to~$0$ and hence the condition~$\beta \lambda_M (\tau) \leq \gamma$ is satisfied for sufficiently large~$\tau$.
\end{proof}
\begin{rem}
Theorem~\ref{Teo:seir2} implies that, if the parameters~$\beta$,~$\gamma$, and the matrix~$A$ can change over time, the conditions of the beginning of the epidemic spread or a decrease in quantity~$E(t)+I(t)$ could occur several times over time. This may justify the occurrence of the multiple epidemic waves.
\end{rem}
\begin{rem} If the graph~$G$ is a complete graph~$K_n$ ($K_n$ is a simple undirected graph where every pair of distinct vertices is connected by a unique edge), then we recover the scalar SEIR model
 by setting~$s(t)=\sum_j s_j(t)$,~$e(t)=\sum_j e_j(t)$,~$i(t)=\sum_j i_j(t)$,
$r(t)=\sum_j r_j(t)$.
\end{rem}
\begin{figure}[t]
\centering
\begin{tabular}{cc}
(a)\includegraphics[height=75pt]{./3D-GEOSIR-IMAGES/GEO-graph-weight.jpg}
&(b)\includegraphics[height=70pt]{./3D-GEOSIR-IMAGES/GEO-SYR-graph.jpg}
\end{tabular}
\caption{(a) Un-symmetric and symmetric weights for the SEIR models on a graph, (b) definition of the SEIR model on graphs starting from the governing differential equations of the 1D SEIR model at each node of the input graph.\label{fig:EDGE-WEIGHTS}}
\end{figure}
\section{Spectrum of the SEIR model on graphs\label{sec:spectra}}Let~$\tilde{A}$ be the adjacency matrix of the input undirected graph~$\mathcal{G}$ and let us consider the diagonal matrix \mbox{$ diag(S(t)):=\textrm{diag}(s_{i}(t))_{i=1}^{n}$} of susceptible cases \mbox{$ s (t):=(s_{j}(t))_{j=1}^{n}$}. {\color{black}In this section we always assume that all the components of~$S(t)$ are strictly positive. Owing to the proof of Lemma~\ref{l:bounds} this amounts to assuming that they are strictly positive at~$t=0$.} The coefficient matrix \mbox{$B(t):= diag(S(t))A$}, \mbox{$A:=(\tilde{A}+I_n)$}, of the SEIR model on a general simple graph can be interpreted as a weighted adjacency matrix, where the weight associated with the edge \mbox{$(i,j)$} is \mbox{$b_{ij}(t):=s_{i}(t)a_{ij}$}; indeed, the weighted adjacency matrix is not symmetric and the weighted graph is directed.

To study the spectrum of \mbox{$B(t)$} and eventually work with a symmetric weighted adjacency matrix, we introduce its ``symmetrisation'' (Fig.~\ref{fig:EDGE-WEIGHTS})
\begin{equation*}
B_{sym}(t):= diag(S(t)) ^{1/2} A diag(S(t)) ^{1/2},
\end{equation*}
where the weight associated with the edge \mbox{$(i,j)$} is \mbox{$b^{sym}_{ij}(t):=s_{i}^{1/2}(t)a_{ij}s_{j}^{1/2}(t)$}. Furthermore, the matrices~$ B(t)$ and~$ B_{sym}(t)$ have the same eigenvalues; in fact,
\begin{equation*}
\begin{split}
 B(t)-\nu I
&= diag(S(t)) ^{1/2}\left( diag(S(t)) ^{1/2}\, A\, diag(S(t)) ^{1/2}-\nu I \right) diag(S(t)) ^{-1/2}\\
&=diag(S(t)) ^{1/2}\left(B_{sym}(t)-\nu I \right) diag(S(t)) ^{-1/2}
\end{split}
\end{equation*}
Let~$ v~$ be an eigenvector of \mbox{$ B(t)$} with eigenvalue~$\nu$. Then,
\begin{equation*}
\begin{split}
 &B(t) v =\nu v \iff
 diag(S(t)) ^{{\color{black}-}1/2} B v =\nu diag(S(t)) ^{-1/2} v \iff
 y := diag(S(t)) ^{-1/2} v ,\\
 &diag(S(t))^{{\color{black}-}1/2} B diag(S(t)) ^{1/2} y =\nu y
 \iff B_{sym}(t)v=\nu v.
 \end{split}
\end{equation*}
Indeed, \mbox{$ y := diag(S(t)) ^{-1/2} v~$} is an eigenvector of~$ B_{sym}(t)$ with eigenvalue~$\nu$, i.e., the spectrum of~$ B(t)$ is real and it uniquely identifies the spectrum of~$ B_{sym}(t)$, and vice versa. Note that the eigenvectors \mbox{$ y _{i}:= diag(S(t)) ^{-1/2} v _{i}$}, \mbox{$i=1,\ldots,n$} are not orthonormal.
\begin{figure}[t]
\centering
\begin{tabular}{cccc}
\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-O.jpg}
&\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-N.jpg}
&\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-M.jpg}
&\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-L.jpg}\\
\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-J.jpg}
&\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-I.jpg}
&\includegraphics[height=0.16\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-H.jpg}
&\includegraphics[height=0.15\textwidth]{./3D-GEOSIR-IMAGES/GEO-SIR-G.jpg}
\end{tabular}
\caption{Colormap of the evolution of the variable \mbox{$I(\cdot)$} (time increases from top to bottom, and from left to right) on a graph with constant weights, according to the symmetric SEIR model in Eq. (\ref{eq:SYMMETRIC-SEIR}).\label{fig:ED-SEIR-TEST}}
\end{figure}
From these properties, we consider the \emph{SEIR} and \emph{symmetric SEIR models on a general simple graph} (Fig.~\ref{fig:ED-SEIR-TEST})
\begin{equation}\label{eq:SYMMETRIC-SEIR}
\left\{
\begin{array}{l}
\dot{S}=-\beta diag(S(t)) {\color{black}A} I
=-\beta B(t) I \\
\dot{E}=\beta B(t) I -\mu E \\
\dot{I}=\mu E -\gamma I
\end{array}
\right.\qquad
\left\{
\begin{array}{l}
\dot{S}=-\beta B_{sym}(t) I \\
\dot{E}=\beta B_{sym}(t) I -\mu E \\
\dot{I}=\mu E -\gamma I .
\end{array}
\right.
\end{equation}
\subsection{Bounds to the spectrum of SEIR on graphs}
Let~$d_{max}$ be the maximum degree of a node in the input graph~$\mathcal{G}$, and let~$d_{avg}$ be the average degree of a node in~$\mathcal{G}$. Let \mbox{$\nu_{1}\geq\nu_{2}\geq\ldots\nu_{n}$} be the eigenvalues of the adjacency matrix of~$\mathcal{G}$. Then, the bound \mbox{$d_{avg}\leq\nu_{1}\leq d_{max}$} is applied to estimate the variation of the eigenvalues in linear time. The maximum eigenvalue is computed efficiently through the Arnoldi method~\cite{GOLUB1989}. We now derive upper and lower bounds to the eigenvalues of~$ B(t)$, or equivalently \mbox{$ B_{sym}(t)$} (same eigenvalues):
\begin{equation*}
\begin{split}
\nu_{1}( B(t))
&=\nu_{1}( B_{sym}(t))
=\max_{ v \neq 0 }\frac{ v ^{\top} diag(S(t)) ^{1/2} {\color{black}A} diag(S(t)) ^{1/2} v ^{\top}}{ v ^{\top} v }\\
&=\max_{ y \neq 0 }\frac{ y ^{\top} {\color{black}A} y }{ y ^{\top} diag(S(t)) ^{-1} y },\quad y := {\color{black}diag(S(t)) ^{1/2}} v ,\\
&\leq\frac{\nu_{1}({\color{black} \tilde A} )+1}{\min_{i}\{s_{i}^{-1}(t)\}}
\leq(\nu_{1}({\color{black} \tilde A)} +1) \max_{i}\{\|s_{i}\|_{\infty}\}
\leq (d_{max}+1)\max_{i}\{\|s_{i}\|_{\infty}\}.
\end{split}
\end{equation*}
In an analogous way,
\begin{equation*}
\begin{split}
\nu_{1}( B_{sym}(t))
&={\color{black} \max}_{ v \neq 0 }\frac{ v ^{\top} B_{symm}(t) v }{ v ^{\top}\mathbf{}v}
\geq \frac{ 1 ^{\top} B_{sym}(t) 1 }{ 1 ^{\top} 1 }\geq\frac{1}{n}\left( 1 ^{\top} B_{sym}(t) 1 \right)\\
&\geq\frac{1}{n}\nu_{1}( A)\sum_{i}s_{i}(t)
\geq( {\color{black} \nu_1(\tilde A)}+1)\min_{i}\{s_{i}(\cdot)\}=(d_{avg}+1)\min_{i}\{s_{i}(\cdot)\}.
\end{split}
\end{equation*}
\subsection{SEIR model and graph Laplacian}
Let~$ D~$ be the diagonal matrix whose entries are the degrees \mbox{$ d :=(d_{i})_{i}$} of the nodes of the input graph and \mbox{$ L := D - {\color{blue} \tilde A}$} the corresponding Laplacian matrix. Then, we rewrite the equation(s) of the SEIR model as
\begin{equation}\label{eq:DIFFUSIVE-SEIR}
\begin{split}
\dot{S}
&=-\beta diag(S(t)) \left[ D - D + {\color{black}A}\right] I (t)\\
&=-\beta diag(S(t)) \left[ D - L +I_n\right] I (t)\\
&=-\beta\left[ diag(S(t)) D - diag(S(t)) L +diag(S(t))\right] I (t)\\
&=-\beta\left[ diag( (d+1) \circ S (t))- diag(S(t)) L \right] I (t),
\end{split}
\end{equation}
where \mbox{$ diag(S(t)) L~$} is a weighted Laplacian matrix. Formally, in the continuous case, this last relation becomes
\begin{equation*}
\partial_{t}s( p ,t)=-\beta w(p)s( p ,t)i( p ,t)+s( p ,t)\Delta i( p ,t),
\end{equation*}
where \mbox{$w(p)$} are weights assigned to the input points~$p$ (Fig.~\ref{fig:DIFFUSION-SIMULATION}),~$\partial_{t}$ is the partial derivative with respect to the time and~$\Delta$ is the continuous Laplace operator.
\begin{figure}[t]
\centering
\begin{tabular}{ccc}
\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-heat-10-3.jpg}
&\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-heat-10-2.jpg}
&\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-heat-10-1.jpg}\\
\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-cont-10-3.jpg}
&\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-cont-10-2.jpg}
&\includegraphics[height=80pt]{./3D-GEOSIR-IMAGES/airport-cont-10-1.jpg}
\end{tabular}
\caption{Colormap of the evolution of the variable \mbox{$I(\cdot)$} (time increases from left to right) on a graph with (1st row) constant weights and (2nd row) positive weights (larger weights in the selected seed point), according to the symmetric SEIR model in Eq. (\ref{eq:DIFFUSIVE-SEIR}).\label{fig:DIFFUSION-SIMULATION}}
\end{figure}
\section{Limit of epidemiological models on graphs\label{sec:graphon}}
We now discuss the continuum limit of compartmental epidemiological models on graph sequences. For simplicity, we explicitly discuss the case of the SEIR model only, but we are confident our results extend to a large class of compartmental models. Considering the SEIR model defined on a sequence of graphs where the number ~$n$ of vertices diverges, we want to understand what happens in the limit~$n \to + \infty$. To achieve this, we rely on a recently developed theory based on the notion of \emph{graphon}. The exposition is organised as follows. In Sect.~\ref{ss:graphon}, we briefly define the notion of graphon and some related notions that we need in the following. In Sect.~\ref{ss:convergence}, we discuss the convergence of the SEIR model defined on a converging sequence of graphs. In Sect.~\ref{ss:samplings}, we show that a stronger notion of convergence can be recovered by introducing suitable deterministic and random samplings. Then, we present the semi-discretisation of the SEIR model on a graphon (Sect.~\ref{sec:semid}) and numerical examples (Sect.~\ref{sec:ER}). The analysis in Sects.~\ref{ss:convergence},~\ref{ss:samplings} is based on~\cite{ADS}.
\begin{figure}[t]
\centering
\includegraphics[height=140pt]{./3D-GEOSIR-IMAGES/GEO-SYR-GRAPH-OVERALL.jpg}
\caption{Generation of the graphon starting from the adjacency matrix of the input graph.\label{fig1}}
\end{figure}
\subsection{Graphons\label{ss:graphon}}
In recent years, a new paradigm for understanding the continuum limit of graph sequences has emerged with the theory of so-called \emph{graphons}, see in particular~\cite{BCCZ18,BCCZ19,BCLSV06,BCLSV08,BCLSV12,LS07} and the references therein.
\begin{definition} \label{d:graphon}
A graphon is an integrable function~$W:[0,1]^2\to\rr$ satisfying~$W(x, y) = W(y, x)$ for a.e.~$x,y\in[0,1]$.
\end{definition}
\paragraph*{The graphon associated with a given graph}
Very loosely speaking, the basic idea underpinning the theory of graphons is to identify the set of nodes of a given graph with the interval~$[0, 1]$. In this way, we can identify the adjacency matrix of an undirected graph with a symmetric function defined on the square~$[0, 1]^2$, that is with a graphon. More precisely, consider a weighted undirected graph~$\mathcal{G}$, with vertices~$\{1, \dots, n\}$. Let~$(\tilde a_{jk})_{j, k=1, \dots, n}$ be its adjacency matrix. Note that we can consider fairly general adjacency matrices as we only assume that the coefficients are nonnegative and symmetric. To construct the graphon associated to~$\mathcal{G}$, consider a partition of~$[0, 1[$ into~$n$ isometric intervals, and term~$I^n_j$ the~$j$-th interval, that is~$I^n_j : = [(j-1)n^{-1}, j n^{-1}[$,~$j=1, \dots,n$. The graphon~$W_{\mathcal{G}}~:~[0, 1[ \times [0, 1[\to \rr$ associated to the graph~$\mathcal{G}$ is defined by setting
$$W_{\mathcal{G}}(x, y) = \tilde a_{jk} \; \text{if~$(x, y) \in I^n_j \times I^n_k$}.$$
We now illustrate the above notion through a simple example, see Fig.~\ref{fig1}.

\paragraph*{Converging sequences of graphons}
We define the so-called \emph{cut-norm} of a given graphon by setting
	\begin{equation}
		\label{cut1}
		\|W\|_{\Box}:=\sup_{S,T\subseteq[0,1]}\left\vert\int_{S\times T}W(x,y)\,dxdy\right\vert , \quad
 \text{for every graphon~$W \in L^\infty ([0, 1]^2)$}.
	\end{equation}
In the above expression, the supremum is taken over all pairs of measurable subsets~$S, T \subseteq [0,1]$. The notion of cut-norm was first introduced by Frieze and Kannan~\cite{FK99}, and its fundamental importance for the theory of graphons was recently unveiled in several papers, see in particular~\cite{BCCZ18,BCCZ19,BCLSV06,BCLSV08,BCLSV12} and the references therein. Here, we limit ourselves to some handwaving remarks. In particular, we point out that the notion of cut-norm for the graphons associated with a sequence of graphs is connected with the notion of \emph{left convergence} for graph sequences, see~\cite[Theorem 3.8]{BCLSV08}. Very loosely speaking, a sequence of graphs is left convergent if the local structure of the graphs is asymptotically stable, in the sense that asymptotically the graphs contain the ``same number of copies" of any given subgraph.

\subsection{The continuum limit of epidemiological models\label{ss:convergence}}
We now discuss our main result concerning the continuum limit of the SEIR model defined on sequences of graphs. For the system \eqref{eq:SIRgraph2}, we now introduce the possibility that the parameters~$\beta$,~$\gamma$,~$\mu$, are positive time-dependent functions. In this way, it is possible to introduce in the model any changes over time due to external interventions (e.g. lockdown or social distancing) rather than the evolution of the biomedical parameters related to the epidemic. We first have to introduce some notation. Fix a graph~$\mathcal{G}_n$ with~$n$ vertices~$\{1, \dots, n\}$ and consider the following SEIR model defined on the set of vertices:
\begin{equation}
		\label{SIR_G}
		\begin{cases}
		\displaystyle{\f{ds_j^n(t)}{dt}=-s_j^n(t)\f1{n}\sum_{k=1}^{n}\beta_k^n(t)a_{jk}^n
		i_k^n(t) }& \\
		\displaystyle{ \f{de_j^n(t)}{dt}=s_j^n(t)\f1{n}\sum_{k=1}^{n}\beta_k^n(t)a_{jk}^n i_k^n(t)-\mu_j^n(t) e_j^n(t)}
		 &\qquad\qquad\qquad j=1,\,\dots,\,n\\
		\displaystyle{ \f{di_j^n(t)}{dt}= \mu_j^n(t) e_j^n(t)-\gamma_j^n(t) i_j^n(t)} & \\
 \displaystyle{ \f{dr_j^n(t)}{dt}= \gamma_j^n(t) i_j^n(t)} & \\

		s_j^n(0)=s_{j,0}^n,\,e_j^n(0)=e_{j,0}^n,\, i_j^n(0)=i_{j,0}^n,\,r_j^n(0)=r_{j,0}^n \phantom{\displaystyle{\int}}
		\end{cases}
	\end{equation}
Also,~$(a^n_{jk})_{j, k=1, \dots, n}$ denotes the weighted adjacency matrix of the graph~$\mathcal{G}_n$ with~$a^n_{jj}=1$, and the time-dependent functions~$\beta_j^n>0$,~$\mu_j^n>0$, and~$\gamma_j^n>0$ denote the infection and recovery coefficients at the node~$j$. Note that~\eqref{SIR_G} boils down to~\eqref{eq:SIRgraph2} provided the coefficient does not depend on time and
$$
 a_{jk} =
 \left\{
 \begin{array}{ll}
 \tilde a_{jk} & j \neq k \\
 1 & j=k.
 \end{array}
 \right.
$$
In the following, we use a more compact notation and denote by~$\texttt{s}^n, \texttt{e}^n,\texttt{i}^n,\texttt{r}^n:[0,+\infty)\to[0,1]^n$ the vectors with~$j$-th component given by~$s_j^n, e_j^n, i^n_j, r^n_j$,~$j=1, \dots, n$, respectively. We will assume the functions~$\beta_k^n(t)$,~$\gamma_j^n(t)$,~$\mu_j^n(t)$ are continuous. More general hypotheses can however be considered considering also discontinuous, but bounded, as for the theory of the Carath\'{e}odory differential equations, see e.g.~\cite{FIL88}: the following results also extend to this case.

We now aim at discussing the limit~$n \to + \infty$ of~\eqref{SIR_G} by applying the theory of graphons. To achieve this, we first of all have to regard the functions~$\texttt{s}^n,\texttt{i}^n,\texttt{r}^n: \rr^+ \to[0,1]^n$ as functions defined on~$\rr^+ \times [0, 1]$. To this end, in the following we always identify any function~$\texttt{u}: \rr^+ \to\rr^n$,~$\texttt{u}=\left(u_j\right)_{j\in V(\mathcal{G}_n)}$, with the piecewise constant function
\begin{equation}\label{uG->u01}
\texttt{u}_n(t, x):=\sum_{j=1}^{n}u_j (t) \mathbbm{1}_{I_j^n}(x)\,,
\end{equation}
where~$\mathbbm{1}_{I_j^n}$ is the characteristic function of the interval~$I_j^n=[ (j-1)n^{-1}, jn^{-1}[$. Furthermore, for a function~$v(t,x)$,~$(t,x)\in (\mathbb{R}^+\times [0,1])$, we set~$v_j^n(t):=\langle v (t, \cdot) \rangle_{I^n_j }$, where we denote with~$\langle v \cdot \rangle_{I^n_j }$ the average of the function on the set~$I^n_j : =[(j-1)n^{-1}, jn^{-1}[$, and~$v_n(t,x)=\sum_{j=1}^{n} v_j^n (t) \mathbbm{1}_{I_j^n}(x)$. Whenever we say that a sequence of functions defined on the vertices converges to a limit function defined on~$[0,1]$, we always mean that the corresponding piecewise constant functions are defined as in \eqref{uG->u01} converge to the given limit. We are now ready to introduce the discrete graphon representation of~\eqref{SIR_G}
\begin{equation}
		\label{SEIR_N}
		\begin{cases}
		\partial_t s_n(t,x)=-s_n(t,x) \displaystyle{\int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy} & \\
		\partial_t e_n(t,x)=s_n(t,x)
 \displaystyle{{\int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy}-\mu_n(t,x)e_n(t,x) }
 & \qquad x\in[0,1]\\
		\partial_ti_n (t,x)= \mu_n(t,x)e(t,x)-\gamma_n(t,x)i(t,x) \phantom{\displaystyle{\int}} & \\
 \partial_tr_n(t,x)=\gamma_n(t,x)i_n(t,x) \phantom{\displaystyle{\int}} & \\

		s_n(0,x)=s_0(x),\,e_n(0,x)=e_0(x),\,i_n(0,x)=i_0(x),\,r_n(0,x)=r_0(x) \phantom{\displaystyle{\int}}
		\end{cases}
	\end{equation}
where~$s_0(x),\,e_0(x),\,i_0(x),\,r_0(x)$ are suitable piecewise constant functions. The dynamics of the discrete graphon model can be studied using the original ODE's system.
\begin{Lem}\label{Lem:disgraphon}
Let~$n>1$ and~$(s_j^n(t),\,e_j^n(t),\,i_j^n(t),\, r_j^n(t)),\, t\geq 0,\,j=1,...,n$ the solution of the Cauchy problem \eqref{SIR_G}, then the corresponding piecewise constant functions $(s_n(t,x),\,e_n(t,x),\, i_n(t,x),\, r_n(t,x))$, are the solution, formulated almost everywhere, of the Cauchy problem \eqref{SEIR_N},
$t\geq 0,\,x\in [0,1]$.
\end{Lem}
\begin{proof}
First, we observe that the map~$t \mapsto (s_n (t),\,e_n(t),\,i_n(t),\, r_n(t))$ is differentiable for almost everywhere~$x\in [0,1]$ and~$t>0$. Then, combining for example the $s_j^n$ components from \eqref{SIR_G},
\begin{equation}\label{eq:superpos}
\begin{split}
\partial_t s_n(t,x) &= - \sum_{j=1}^{n} \left( s_j^n(t)\f1{n}\sum_{k=1}^{n}\beta_k^n(t)a_{jk}^n i_k^n(t) \right) \mathbbm{1}_{I_j^n}(x) \\
&= - \sum_{j=1}^{n} s_j^n(t) \mathbbm{1}_{I_j^n}(x) \left( \int_{(k-1)/n}^{k/n} \beta_k^n(t)a_{jk}^n i_k^n(t) \right) \\
&= - \sum_{j=1}^{n} s_j^n(t) \mathbbm{1}_{I_j^n}(x) \left( \int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy \right) \\
&= -s_n(t,x) \displaystyle{\int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy}.
\end{split}
\end{equation}
The same can be done for the other components of the system \eqref{SEIR_N}. Finally, for the initial condition just use the definition of the functions
$s_n(0,x),\,e_n(0,x),\,i_n(0,x),\,r_n(0,x)$.
\end{proof}
If we consider system \eqref{SIR_G} or, equivalently, the system \eqref{SEIR_N} as a quadrature rule which uses a piecewise constant approximation, we can
formally introduce the limit ``continuous counterpart'' of~\eqref{SIR_G}, or \eqref{SEIR_N}:
\begin{equation}
		\label{SIR_W}
		\begin{cases}
		\partial_t s(t,x)=-s(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy} & \\
		\partial_t e(t,x)=s(t,x)
 \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy-\mu(t,x)e(t,x) }
 & \qquad x\in[0,1]\\
		\partial_ti(t,x)= \mu(t,x)e(t,x)-\gamma(t,x)i(t,x) \phantom{\displaystyle{\int}} & \\
 \partial_tr(t,x)=\gamma(t,x)i(t,x) \phantom{\displaystyle{\int}} & \\

		s(0,x)=s_0(x),\,e(0,x)=e_0(x),\,i(0,x)=i_0(x),\,r(0,x)=r_0(x) \phantom{\displaystyle{\int}}
		\end{cases}
	\end{equation}
which is the graphon SEIR model (G-SEIR model).
\subsection{Well-posedness and properties of the graphon limit}
The graphon form \eqref{SIR_W} of the SEIR model is an infinite-dimensional bilinear dynamical system, where each point~$x\in [0,1]$ corresponds to a (sub-)community. While the dynamics of \eqref{SEIR_N} describes the evolution of a piecewise constant macroscopic approximation. In the following, we will make the following assumptions on the data of the graphon model \eqref{SIR_W}.
\begin{assumptionp}{G-SEIR model}\label{Ass:GSEIR} {\it Assume that the following hypothesis holds.
\begin{itemize}
\item[i)]~$W\in L^\infty ([0,1]^2)$ is a non negative graphon~$W\geq 0$ a.e. on~$[0,1]^2$, then~$W\in L^p ([0,1]^2),\, p\geq 1$. There is a constant~$K_w>0$ such that
$ess\sup |W |\leq K_w$.
\item[ii)]~$\beta,\,\gamma , \, \mu \in L^\infty (\mathbb{R}_+ \times [0,1])$, there are constants~$c_0>0,\,K_0>$ such that~$\inf \beta,\, \inf \gamma ,$
$\inf \mu \geq c_0$, and~$ess\sup \vert\beta\vert,\,ess\sup \vert\gamma\vert,\,ess\sup \vert\mu\vert\leq K_0$.
\item[iii)]~$s_{0},e_0, i_{0},r_{0} \in L^\infty([0,1])$, and ~$0 \leq s_0, e_0, i_0, r_0 \leq 1$, ~$s_{0}(x)+e_0(x) +i_{0}(x)+r_{0}(x)=1$ a.e. on~$[0,1]$.
\end{itemize}
}
\end{assumptionp}
Furthermore, we denote by~$B$ the Banach space~$B_{\infty}=(L^\infty [0,1])^4$, with norm $\| \textbf{u}\|_{B_\infty}~=~\sum_{i=1}^{4} \| u_i \|_{L^\infty}$, where
$\textbf{u}=(u_1,\,u_2,\,u_3,\, u_4)\in B_{\infty}$ and~$\| v \|_{L^\infty} = \| v \|_{L^\infty ([0,1])} = ess\sup_{x\in [0,1]}~|v(x)|$; the positive cone in~$B_\infty$
\[
B_\infty^+ = \left\{ \textbf{u}=(u_1,\,u_2,\,u_3,\, u_4)\in B_{\infty}\,:\, u_i(x)\geq 0\,\,a.e.\, on \,[0,1] \right\},
\]
is a proper cone in~$B_\infty$ with non-empty interior; finally the space~$C^0([0,T];B_\infty )$ is the space of continuous function~$v:[0,T] \rightarrow B_\infty$ with norm
\begin{equation}\label{eq:norm:C0B}
\| v \|_{C^0([0,T];B_\infty )} ~=~ \sup_{0\leq t \leq T}~\| v(t) \|_{B_\infty}.
\end{equation}
Then the system \eqref{SIR_W} can be studied as an ordinary differential equation in Banach space~$B_\infty$. To demonstrate the well-posedness of the problem \eqref{SIR_W} we first consider some a-priori estimates for the solution and then we prove the existence and local uniqueness of the solution, and then extend it to a global solution for every~$t>0$. While it is straightforward to verify an upper bound for the solution, it is necessary to establish the non-negativity of the solution itself. In particular, we will prove the invariance of the cone~$B_\infty^+$ with respect to the Cauchy problem \eqref{SIR_W}.

Let~$X$ a Banach space and~$T>0$, we consider a function~$G: [0,T) \times X \rightarrow X$ and we we suppose that the solution~$u:[0,T) \rightarrow X$ of the following Cauchy problem
\begin{equation}\label{eq:general:ode}
\left\{
 \begin{array}{ll}
 u^\prime (t) = G(t,u(t)), & ~t\in [0,T), \\
 u(0)=u_0\in X & ~~
 \end{array}
\right.
\end{equation}
exists and is unique. We recall that a set~$A\subset X$ is said to be forward invariant with respect to~$G$ if the solution~$u(t),~t\in [0,T)$ of \eqref{eq:general:ode} takes values in~$A$ provided that~$u_0\in A$ (see e.g.~\cite{ODEBanach} section 5.2). Theorems on flow-invariance are well-known in the case~$X=\mathbb{R}^n$, for the general case we cite for example the works of R. Redheffer, W. Walter~\cite{RedWal1975,RedWal1986} and H. Br\`{e}zis~\cite{Brezis1970}. In most applications, the set~$A$ has a structure which makes the forward invariance easier to show. Suppose that the positive cone~$X_+$ is a non-empty closed subset of~$X$,~$X^*_+$ the space of all continuous linear functionals on~$X_+$, from the Theorem 1. and the property {\it (f)} of section 4 in~\cite{RedWal1975}, we can deduce the following result.
\begin{Lem}\label{lem:nonneg}
Let~$X_+$ a proper cone of~$X$ with non-empty interior, if for all~$(t,y) \in [o,T) \times \partial X_+$, and for all~$f\in X_+^*$, such that~$f(y)=0$ we have
$f(G(t,y))\geq 0$, then~$X_+$ is a forward invariant set for the Cauchy problem \eqref{eq:general:ode}.
\end{Lem}
Let~$C^1(\mathbb{R}_+;B_\infty)$ the Banach space of differentiable function~$v:\mathbb{R}_+ \rightarrow B_\infty$, we state our main result about the Cauchy problem
\eqref{SIR_W}.
\begin{Thm}\label{teo:SEIR:W}
Let assume that hypotheses {\bf (\ref{Ass:GSEIR})} hold. Then there exists a unique solution~$(s,~e,~i,~r)\in C^1(\mathbb{R}_+;B_\infty)$ of the Cauchy problem \eqref{SIR_W}.
\end{Thm}
 \begin{proof} \textit{Local existence and uniqueness.}
The system \eqref{SIR_W} is in the form of \eqref{eq:general:ode} where~$X=B_\infty$ and for~$\textbf{u}=(s,~e,~i,~r)$
\begin{equation}\label{eq:def:Gu}
G(t,\textbf{u})=
 \left[
\begin{array}{c}
G_1(t,\textbf{u}) \\
G_2(t,\textbf{u}) \\
G_3(t,\textbf{u}) \\
G_4(t,\textbf{u})
\end{array}
\right]
~=~
 \left[
\begin{array}{l}
 -s(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy} \\
 s(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy-\mu(t,x)e(t,x) } \\
 \mu(t,x)e(t,x)-\gamma(t,x)i(t,x) \\
 \gamma(t,x)i(t,x)
\end{array}
\right].
\end{equation}
Let~$\mathbf{u}=((s,~e,~i,~r),\,\mathbf{\hat{u}}=((\hat{s},~\hat{e},~\hat{i},~\hat{r})\in B_\infty$ such that~$\|\mathbf{u} \|_{B_\infty},\,\| \mathbf{\hat{u}} \|_{B_\infty}
\leq \bar{C}$ for a suitable constant~$\bar{C}>0$. Then,
\begin{equation}
\begin{split}
&\vert G_1(t,\mathbf{u}) -G_1 (t,\mathbf{\hat{u}})\vert\\
&= \left\vert -s(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy} + \hat{s}(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)\hat{i}(t,y)\,dy} \right\vert \\
&\leq \left\vert -s(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy} + \hat{s}(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y){i}(t,y)\,dy} \right\vert \\
&+ \left\vert -\hat{s}(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy} + \hat{s}(t,x) \displaystyle{\int_0^1\beta(t,y)W(x,y){i}(t,y)\,dy} \right\vert \\
&\leq K_w \bar{C} K_0 ( \| s - \hat{s}\|_{L^\infty} + \| i - \hat{i}\|_{L^\infty}).
\end{split}
\end{equation}
Similarly for the other components of~$G$,
\[
\begin{array}{l}
 \vert G_2(t,\mathbf{u}) -G_2 (t,\mathbf{\hat{u}})\vert \leq K_w \bar{C} K_0 ( \| s - \hat{s}\|_{L^\infty} + \| i - \hat{i}\|_{L^\infty}) + K_0 \| e - \hat{e}\|_{L^\infty}, \\
 \vert G_3(t,\mathbf{u}) -G_3 (t,\mathbf{\hat{u}})\vert \leq K_0 ( \| e - \hat{e}\|_{L^\infty} + \| i - \hat{i}\|_{L^\infty})\\
 \vert G_4(t,\mathbf{u}) -G_4 (t,\mathbf{\hat{u}})\vert \leq K_0 \| i - \hat{i}\|_{L^\infty}
\end{array}
\]
therefore the following estimate holds uniformly with respect to time,
\begin{equation}\label{eq:lip:G}
\| G_(t,\mathbf{u}) -G (t,\mathbf{\hat{u}})\|_{B_\infty} \leq C^*~\| \mathbf{u} - \mathbf{\hat{u}}\|_{B_\infty},
\end{equation}
where~$C^*=\max \{ K_w\bar{C}K_0,~K_0\}$. Then~$G$ is a local Lipschitz function and we have the existence and uniqueness of a local solution~$\mathbf{u}(t)$, for~$t\in [0,\tau ]$, with~$\tau >0$ for the Cauchy problem \eqref{SIR_W} (see e.g. Section 1 of~\cite{ODEBanach}). Moreover the solution~$\mathbf{u}\in C^1([0,\tau ]; B_\infty)$.

\textit{Global solution,~$t\in\mathbb{R}_+$.} Adding the equations of the system \eqref{SIR_W} we obtain
\[
\partial_t (s_(t,x)+e_(t,x)+i_(t,x)+r_(t,x))=0\,\, a.e.\,\,on\,\, [0,1].
\]
From the assumptions on the initial data, it can be concluded that
\[
s_(t,x)+e_(t,x)+i_(t,x)+r_(t,x)=1\,\, a.e.\,\,on\,\, [0,1].
\]
Applying Lemma~\ref{lem:nonneg} with~$X=B_\infty$ and~$X^+=B_\infty^+$ it is possible to show that the components of the solution are almost everywhere non-negative. First of all, a null component~$s,~e,~i,~r$ belongs to the boundary~$\partial B_\infty^+$ of~$B_\infty^+$, and~$G(t,\mathbf{u})$ can be rewritten as a sum of vectors with all but one null component. For a single function~$v\in L^\infty_+$, the positive cone of the space~$L^\infty$, and a continuous linear functional~$f$ on~$L^\infty_+$ such that~$f(v)=0$, then for all~$z\in L^\infty$, we have~$f(z~v)=0$. Since~$v$ is a.e. non-negative, we have
\[
-\| z \|_{L^\infty}~v~\leq z~v \leq ~\| z \|_{L^\infty}~v,
\]
and
\[
-\| z \|_{L^\infty}~f(v)~\leq f(z~v) \leq ~\| z \|_{L^\infty}~f(v),
\]
but~$f(v)=0$, then~$f(z~v)=0$. For example, for the component~$G_1$, and other equal to zero, if~$s \geq 0$ a.e.,~$-(\int_0^1\beta(t,y)W(x,y)i(t,y)\,dy)\in L^\infty [0,1]$,
and the value of the functional is equal to zero. The same happens for all the terms of the decomposition of~$G (t,\mathbf{u})$, then the hypotheses of the Lemma~\ref{lem:nonneg} are verified and the positive cone~$B_\infty^+$ is a set forward invariant for the Cauchy problem \eqref{SIR_W}. As a consequence~$0 \leq s(t,x),\, e(t,x),\, i(t,x),\, r(t,x)$ almost everywhere, so the solution is uniformly bounded and we can define it globally for each~$t\in\mathbb{R}_+$.
\end{proof}
\begin{rem}
We point out that it is not possible to apply techniques based on monotone~\cite{Show1997} or quasi-monotone operators~\cite{Volk1972} because of the sign in the term of the first two components of~$G$. In the case of a SIR model, without the Exposed sub-population, if we do not consider the Removed class it is possible to rewrite the final system with a quasi-monotone operator. We also observe that Theorem~\ref{teo:SEIR:W} can be applied also to the discrete graphon model \eqref{SEIR_N} with minor changes.
\end{rem}
We now consider the convergence of the solutions of the discrete graphon model \eqref{SEIR_N} (or equivalently of the solutions of the discrete model \eqref{SIR_G}) to the solutions of the continuous graphon model \eqref{SIR_W}. Since we consider non-negative graphs we will adopt for convergence instead of the cut-norm \eqref{cut1} the~$L^1$ norm. For bounded graphon~$W$ the following inequalities hold (see~\cite{LO12}, section 12.4),
\[
\|W\|_{\Box} \leq \| W \|_{L^1}\leq \| W \|_{L^2} \leq \| W \|_{L^1}^{1/2}
\]
and convergence with respect to the~$L^1$ norm implies the convergence with respect to the cut-norm. Moreover for a~$0-1$ valued graphon~$W$ which is close to our graphon for our epidemiological application, and for a sequence~$\{W_n\}$ of graphons such that~$\|W_n -W \|_{\Box} \rightarrow 0$, then~$\|W_n -W \|_{L^1} \rightarrow 0$ (\cite{LO12}, Proposition 8.24).
\begin{Thm}\label{t:grafoni1} Let~$T>0$, and~$(\mathcal{G}_n)_{n}$ be a sequence of undirected graphs with vertices~$\{1, \dots, n\}$ such that the entries~$a_{jk}^n$ of the~$n$-th weighted adjacency matrix satisfy the following assumptions: i)~$a_{jk}^n=a_{kj}^n$ for every~$j, k=1, \dots, n$; ii)~$a_{jk}^n\geq0$, for every~$j, k=1, \dots, n$; iii) there is~$K_G>0$ such that
 \begin{equation}\label{bound_deg_G}
 \sup_{n\in\nn} \sup_{j=1, \dots, n}\f{1}{n}\displaystyle{\sum_{k=1}^n}a_{jk}^n \leq K_G.
 \end{equation}
 Also, assume that there is a nonnegative graphon~$W\in L^\infty \left( [0,1]^2\right)$ such that
 \begin{equation}\label{e:conv_tloc1}
  \left\| W_{\mathcal{G}_n}-W\right\|_{L^1} \to 0\qquad\text{ as }n\to+\infty\,.
 \end{equation}
 Assume furthermore that~$s_{j, 0}^n,e_{j,0}^n,i_{j,0}^n,r_{j,0}^n\geq0$ satisfy~$s_{j,0}^n+e_{j,0}^n+i_{j,0}^n+r_{j,0}^n=1$, that
 ~$$
 \| \beta^n_j \|_{L^\infty(\rr^+)}, \| \mu^n_j \|_{L^\infty(\rr^+)}, \| \gamma^n_j \|_{L^\infty(\rr^+)} \leq M, \; \text{for every~$j=1, \dots, n$ and~$n \in \mathbb N$}
 ~$$
 for a suitable constant~$M>0$ and that
 ~$$
 \beta^n \to \beta, \; \gamma^n \to \gamma, \; \mu^n \to \mu \;
 \text{strongly in~$L^1 (\mathbb R_+ \times [0, 1])$}
 ~$$
 for some~$\beta, \gamma, \mu \in L^\infty (\mathbb R_+ \times [0, 1])~$ such that~$\inf \beta ,\,\inf \gamma , \, \inf \mu >0$.
Let~$\mathbf{u}_n = (s_n,~e_n,~i_n,~r_n)$,~$n=1,2,\ldots$, the solution of the discrete graphon Cauchy problem \eqref{SEIR_N} for~$t\in [0.T]$, with initial data
$s_n(0,x),~e_n(0,x),~i_n(0,x),~r_n(0,x) \in L^\infty([0,1])$, such that~$0 \leq s_n(0,x), e_n(0,x), i_n(0,x), r_n(0,x) \leq 1$, ~$s_n(0,x)+e_n(0,x) +i_n(0,x)+r_n(0,x)=1$ a.e. on~$[0,1]$.
Suppose that
\[
 s_n(0,x) \to s_0(x) , \, e_n(0,x) \to e_0(x) , \, i_n(0,x) \to i_0(x) , \, r_n(0,x) \to r_0(x) , \,
 \text{in~$L^\infty ([0, 1])$},
\]
with~$0 \leq s_0, e_0, i_0, r_0 \leq 1$, ~$s_0(x)+e_0(x) +i_0(x)+r_0(x)=1$ a.e. on~$[0,1]$. \\
Then the sequence~$\{ \mathbf{u}_n \}$ converges to the solution~$\mathbf{u}$ of the continuous graphon Cauchy problem \eqref{SIR_W},~$t\in [0.T]$, in the norm of the space
$C^0([0,T];B_\infty )$.
\end{Thm}
\begin{proof}
The assumptions {\bf (\ref{Ass:GSEIR})} are verified. The Cauchy problems \eqref{SIR_W} and \eqref{SEIR_N} can be rewritten equivalently as integral equations (mild solution),
\begin{equation}\label{eq:mild:solution}
\begin{array}{l}
\mathbf{u}(t,x)= \mathbf{u}(0,x)+\int_{0}^{t} G(\tau ,\mathbf{u}(\tau ,x)) d\tau \\
\mathbf{u}_n (t,x)= \mathbf{u}_n (0,x)+\int_{0}^{t} G_n(\tau,\mathbf{u}_n(\tau,x)) d\tau ,
\end{array}
\end{equation}
where
\begin{equation}\label{eq:def:Gn}
G_n(t,\textbf{u}_n)=
 \left[
\begin{array}{c}
G_{n1}(t,\textbf{u}) \\
G_{n2}(t,\textbf{u}) \\
G_{n3}(t,\textbf{u}) \\
G_{n4}(t,\textbf{u})
\end{array}
\right]
~=~
 \left[
\begin{array}{l}
 -s_n(t,x) \displaystyle{\int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy} \\
 s_n(t,x) \displaystyle{\int_0^1\beta_n(t,y)W_{\mathcal{G}_n}(x,y)i_n(t,y)\,dy-\mu_n(t,x)e_n(t,x) } \\
 \mu_n(t,x)e_n(t,x)-\gamma_n(t,x)i_n(t,x) \\
 \gamma_n(t,x)i_n(t,x)
\end{array}
\right].
\end{equation}
In the following, we will omit explicitly writing the variables~$x$ and~$y$ to simplify the notation when the context is clear.
Subtracting component by component~$\mathbf{u}$ from~$\mathbf{u}_n$ as mild solutions we have,
\begin{equation}\label{eq:u:meno:un}
\begin{array}{l}
s(t)-s_n(t) = (s(0)-s_n(0))+\displaystyle{\int_{0}^{t} \left[s_n(\tau) \int_0^1\beta_n(\tau)W_{\mathcal{G}_n} i_n(\tau )\,dy-
 s(\tau) \int_0^1\beta (\tau)W i (\tau )\,dy \right] d\tau} , \\
\\
e(t)-e_n(t) = (e(0)-e_n(0))+\displaystyle{\int_{0}^{t} \left[s(\tau) \int_0^1\beta(\tau)W i(\tau )\,dy-
 s_n(\tau) \int_0^1\beta (\tau)W_{\mathcal{G}_n} i_n (\tau )\,dy \right] d\tau} \\
~~~~~~~~~~~+ \displaystyle{\int_{0}^{t}\left[ \mu_n(\tau )e_n(\tau )-\mu (\tau )e (\tau)\right] d\tau }, \\
\\
i(t)-i_n(t) = (i(0)-i_n(0))+\displaystyle{\int_{0}^{t} \left[ (\mu (\tau )e (\tau )-\mu_n(\tau )e_n(\tau )) +(\gamma_n(\tau )i_n(\tau )-\gamma (\tau )i (\tau )) \right] d\tau }, \\
r(t)-r_n(t) = (i(0)-i_n(0))+\displaystyle{\int_{0}^{t} \left[ \gamma (\tau )i (\tau )- \gamma_n(\tau )i_n(\tau ) \right] d\tau }.
\end{array}
\end{equation}
For the first component, we have the following estimate,
\begin{equation}
\begin{split}
\vert s(t)&-s_n(t)\vert \leq \vert s(0)-s_n(0)\vert+ \displaystyle{\int_{0}^{t} \left\vert s_n \int_0^1\beta_n W_{\mathcal{G}_n} i_n \,dy-
 s \int_0^1\beta W i \,dy \right\vert d\tau} \\
&= \vert s(0)-s_n(0) \vert + \displaystyle{\int_{0}^{t} \left\vert - s \int_0^1\beta W i \,dy +s_n \int_0^1 (\beta_n W_{\mathcal{G}_n} -\beta W) i \,dy +
s_n \int_0^1\beta W i_n \,dy \right\vert d\tau } \\
&= \vert s(0)-s_n(0) \vert + \displaystyle{ \int_{0}^{t} \vert (s_n-s) \int_0^1\beta W i \,dy +s_n\int_0^1 (\beta_n W_{\mathcal{G}_n} -\beta W) i_n \,dy}\\
&\displaystyle{+s_n \int_0^1\beta W (i_n-i) dy \vert d\tau } \\
&\leq \|s(0)-s_n(0) \|_{L^\infty} + \displaystyle{ \int_{0}^{t} \left[ K_w K_0 \left( \|s-s_n \|_{L^\infty} + \|i-i_n \|_{L^\infty} \right) +\|\beta W -\beta_n W_{\mathcal{G}_n}\|_{L^1} \right] d\tau }.
\end{split}
\end{equation}
Similarly for the other components of~$(\mathbf{u}-\mathbf{u}_n)$ we obtain
\begin{equation}
\begin{array}{l}
|e(t)-e_n(t)| \leq \|e(0)-e_n(0) \|_{L^\infty} + \displaystyle{ \int_{0}^{t} \left[ K_w K_0 \left( \|s-s_n \|_{L^\infty} + \|i-i_n \|_{L^\infty} \right) +\|\beta W -\beta_n W_{\mathcal{G}_n}\|_{L^1} \right] d\tau } \\
~~~~~~~~~~~+ \displaystyle{\int_{0}^{t} K_0 \|e -e_n \|_{L^\infty} d\tau }, \\
|i(t)-i_n(t)| \leq \|i(0)-i_n(0) \|_{L^\infty} + \displaystyle{\int_{0}^{t} K_0 \left( \|e-e_n \|_{L^\infty} + \|i-i_n \|_{L^\infty} \right) d\tau }, \\
|r(t)-r_n(t)| \leq \|r(0)-r_n(0) \|_{L^\infty} + \displaystyle{\int_{0}^{t} K_0 \|i-i_n \|_{L^\infty} d\tau }.
\end{array}
\end{equation}
Let~$D(t)= \| \mathbf{u}(t) - \mathbf{u}_n(t) \|_{B_infty}$,~$\hat{C}=\max \{ K_0,\,K_0K_W \}$, for~$t\in [0,T]$
\begin{equation}
D(t) \leq \| \mathbf{u}(0) - \mathbf{u}_n(0) \|_{B_infty} + T \| \beta W -\beta_n W_{\mathcal{G}_n}\|_{L^1} + \hat{C}\displaystyle{\int_{0}^{t} D(\tau ) d\tau },
\end{equation}
then, from the Gronwall's Lemma,
\begin{equation}
D(t) \leq \left[ \| \mathbf{u}(0) - \mathbf{u}_n(0) \|_{B_infty} + T \| \beta W -\beta_n W_{\mathcal{G}_n}\|_{L^1} \right] (e^{\hat{C}t}-1).
\end{equation}
The last term in the previous inequalities is bounded by the quantity~$(e^{\hat{C}T}-1)$, while~$\| \mathbf{u}(0) - \mathbf{u}_n(0) \|_{B_infty} \rightarrow 0$, and
$\| \beta W -\beta_n W_{\mathcal{G}_n}\|_{L^1} \rightarrow 0$ as~$n\to+\infty$. Then~$D(t) \rightarrow 0$ uniformly with respect to time as~$n\to+\infty$.
\end{proof}
\begin{rem}
The conditions~\eqref{e:conv_tloc1} and \eqref{bound_deg_G} are satisfied under fairly reasonable assumptions. More precisely, assume that~$\{\mathcal{G}_n\}_{n\in \nn}$ is a sequence of graphs such that the corresponding sequence of graphons~$\{W_{\mathcal{G}_n}\}_{n \in \nn}$ is uniformly bounded in~$L^\infty$ and non-negative. Then there is a graphon~$W$ and a re-labelling of the vertices of~$\mathcal{G}_n$ such that~\eqref{e:conv_tloc1} holds. Note furthermore that any sequence of graphs with uniformly bounded adjacency matrices satisfies also \eqref{bound_deg_G}. One could also consider the case of time-dependent graphs, see~\cite{ADS} for the precise statement in this case.
\end{rem}
\subsection{Convergence for deterministic and random samplings\label{ss:samplings}}
Before introducing our next result, we make some heuristic considerations. Theorem~\ref{t:grafoni1} in the previous paragraph describes the continuum limit of~\eqref{SIR_G}. In particular, we can conclude that we have the convergence result for any sequence of graphs such that the corresponding sequence of graphons is uniformly bounded. In this sense, the statement of Theorem~\ref{t:grafoni1} goes ``from the sequence of graphs to the limit graphon".
\begin{figure}[t]
\centering
\begin{tabular}{c|c}
(a)\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/K05.jpg}
&(b)\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/K01.jpg}
\end{tabular}
\begin{tabular}{ccc}
\hline
\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/S05.jpg}
&\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/I05.jpg}
&\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/E05.jpg}\\
(a) & &\\
\hline
\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/S01.jpg}
&\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/I01.jpg}
&\includegraphics[height=0.3\textwidth,width=0.3\textwidth]{./3D-GEOSIR-IMAGES/E01.jpg}\\
(b) & &
\end{tabular}
\caption{A simple example: discretization with~$n=100$ points: (a,b) selected Gaussian Kernel~$W_G(x,y)$, see \eqref{eq:graphon-gaussian}, and behaviour of the variables (b)~$S(x,t)$,~$I(x,t)$, and~$E(x,t)$ computed with a forward Euler scheme in time and composite mid-point rule for the integral.\label{fig:2D-SEIR-TEST}}
\end{figure}

We now want in some sense to investigate the reverse path, that is the one that goes ``from the limit graphon to the approximating sequence of graphs". More precisely, we fix a limit graphon~$W$ and we ask ourselves whether or not one can construct approximating sequences of graphs, initial data and coefficients in such a way that the corresponding solutions of~\eqref{SIR_G} provide a good approximation of the solution of~\eqref{SIR_W}. Our next result reports a possible answer to the above question.
\begin{figure}[t]
\centering
\includegraphics[height=0.4\textwidth,width=0.4\textwidth]{./3D-GEOSIR-IMAGES/WXYpc.jpg}%
\includegraphics[height=0.4\textwidth,width=0.4\textwidth]{./3D-GEOSIR-IMAGES/WXYpc2.jpg}
\caption{A simple example of a piecewise graphon (or step graphon) for a block model of the epidemic spread.\label{fig:2D-BLOCK-MODEL}}
\end{figure}
\begin{theorem}
		\label{t:grafoni2}
		Let~$W\in L^\infty([0,1]^2)$ satisfy~$W \ge 0$ a.e. on~$[0, 1]^2$ and
		$$
		 \esssup_{x \in [0, 1]} \int_0^1 W(x, y) dy \leq K
		$$
		for some suitable constant~$K>0$. Assume that ~$\beta,\mu,\gamma\in L^\infty\left(\rr^+\times[0,1]\right)$ satisfy~$\beta, \mu, \gamma \ge 0$ and set
		\begin{equation} \label{e:betagamma}
 \beta_j^n(t):=\langle\beta (t, \cdot) \rangle_{I^n_j },\quad
 \mu_j^n(t):=\langle\mu (t, \cdot) \rangle_{ I^n_j}, \gamma_j^n(t):=\langle\gamma (t, \cdot) \rangle_{ I^n_j},
 \quad \text{for every~$j=1, \dots, n$},
		\end{equation}
		where~$\langle\beta \cdot \rangle_{I^n_j }$ denotes the average of the function on the set~$I^n_j : =[(j-1)n^{-1}, jn^{-1}[$. Assume furthermore that~$s_0, e_0, i_0,r_0\in L^\infty([0,1];[0,1])$ satisfy~$s_0+e_0+i_0+r_0=1$ a.e. in~$[0,1]$. Set
		\begin{equation} \label{e:idata}
	 	s_{0,j}^n:=\langle s_0\rangle_{I^n_j}, \quad e_{0,j}^n:=\langle e_0\rangle_{I^n_j},
 \quad i_{0,j}^n:=\langle i_0\rangle_{I^n_j},
 \quad r_{0,j}^n:=\langle r_0\rangle_{I^n_j}.
		\end{equation}
Then there is a deterministic and a random sampling of the graphon~$W$ such that, for any~$T>0$,
\begin{equation} \label{e:strongconv}
\left\|\normalfont(\texttt{s}^n,\texttt{e}^n,\texttt{i}^n,\texttt{r}^n)-(s,e,i,r)\right\|_{C^0(0,T;L^2([0,1],[0,1]^4))} \to0 \quad \text{ as }n\to+\infty\,,
\end{equation}
where~$(\normalfont\texttt{s}^n,\texttt{e}^n,\texttt{i}^n,\texttt{r}^n):\rr^+ \to[0,1]^4$ solves \eqref{SIR_G} and~$s,e,i,r:[0,T]\times[0,1]\to[0,1]$ satisfies \eqref{SIR_W} in the sense of distributions. The convergence result in~\eqref{e:strongconv} holds almost surely in the case of random sampling.
\end{theorem}
Note that the convergence result in~\eqref{e:strongconv} is stronger than the one in~Theorem~\ref{t:grafoni1}. The proof of the above result and the explicit construction of the deterministic and random sampling is provided in~\cite{ADS} and is inspired by the argument in~\cite{Med19}. In the case of deterministic sampling, we can also handle the time-dependent case, that is~$W$ can also depend on the time variable. Also, through proper rescaling and suitable further assumptions we can consider the case where~$W\in L^2 ([0,1]^2)$, see~\cite{ADS} for the technical details. To conclude, we point out that Theorem~\ref{t:grafoni2} may be relevant in the view of numerical considerations, and indeed in~\cite{ADS} we provide several numerical experiments that use the sampling constructed in the proof of Theorem~\ref{t:grafoni2}.
\begin{figure}[t]
\centering
\includegraphics[height=0.9\textwidth,width=0.9\textwidth]{./3D-GEOSIR-IMAGES/yes-epidemi.jpg}
\caption{A simple block model with a step graphon for which the epidemic spreads.\label{fig:2D-SEIR-BLOCK-YES}}
\end{figure}
\subsection{Semidiscretization of the SEIR model on a graphon}\label{sec:semid}
We consider the graphon operator
\begin{equation}
\label{def:Tw}
(T_Wf)(x)=\int_0^1 W(x,y) f(y) dy, \qquad f \in L^2 ([0, 1])
\end{equation}
which enjoys the following properties.
\begin{Lem}\label{l:compact}
Assume~$W \in L^2([0, 1]^2)$, then the map~$T_W$ defined by~\eqref{def:Tw} is a linear, bounded and compact operator from~$L^2([0, 1])$ to~$L^2 ([0, 1])$.
\end{Lem}
\begin{proof}
We first point out that, owing to the H\"older inequality,
\begin{equation*}
\begin{split}
 \| T_W f \|^2_{L^2([0, 1])} = \int_0^1 \left( \int_0^1 W(x, y) f(y) dy\right)^2 dx & \leq
 \int_0^1 \| W(x, \cdot)\|^2 _{L^2([0, 1])}
 \| f\|^2 _{L^2([0, 1])} dx \\
 &
 = \| W\|^2 _{L^2([0, 1]^2)}
 \| f\|^2 _{L^2([0, 1])}
\end{split}
\end{equation*}
and this shows that the linear map~$T_W$ attains values in~$L^2([0, 1])$ and that it is a bounded (and henceforth continuous) operator.

To conclude, we are left to show that~$T_W$ maps bounded sets in relatively compact sets. Let us fix a bounded set~$B \subset L^2([0, 1])$ and a sequence~$\{ T_W f_n\}_{n \in \mathbb N}$ with~$\{ f_n \}_{n \in \mathbb N} \subset B$. Up to subsequences (which we do not relabel) the sequence~$f_n$ weakly converges in~$L^2([0, 1])$ to some limit function~$f$. To conclude, it suffices to show that~$T_W f_n$ strongly converges to~$T_W f$ in~$L^2([0, 1])$. First, we point out that~$(T_W f_n)(x)$ pointwise converges to~$(T_W f)(x)$ for a.e.~$x \in [0, 1]$. Next, we use again the H\"older inequality and get
$$
 \vert (T_W f )(x)\vert = \left\vert \int_0^1 W(x, y) f_n(y) dy \right\vert
 \leq
 \| W(x, \cdot)\|_{L^2([0, 1])}
 \| f_n \| _{L^2([0, 1])},
$$
for a.e.~$x \in [0, 1]$.
Since the sequence~$\{ f_n \}_{n \in \mathbb N}$ is bounded in~$L^2([0, 1])$, then the right hand side of the above inequality belongs to~$L^2([0, 1])$. By the Lebesgue Dominated Convergence Theorem, we conclude that~$T_W f_n$ strongly converges to~$T_W f$ in~$L^2([0, 1])$.
\end{proof}
To simulate the SEIR model on a graphon, see system (\ref{SIR_W}), we first consider a discretization for the space variable~$x$ compatible with the result in the Theorem~\ref{t:grafoni2}. Then, starting from the uniform partition of the set~$[0,1]$ with the intervals~$\mathbbm{1}_{I_j^n}$, where~$I_j^n=[ (j-1)n^{-1}, jn^{-1}[$,~$j=1,...,n$, we approximate the Graphon operator is defined by~\eqref{def:Tw} by the composite midpoint rule,
\begin{equation}
\label{def:midpoint}
(\bar{T}_Wf)(x_k)=\frac{1}{n}\sum_{j=1}^{n} W(x_k,x_j) f(x_j)
\end{equation}
where~$x_k=(2k-1)/n$,~$k=1,...,n$. \\
The corresponding semi-discrete scheme is the following
\begin{equation}
		\label{SIR_W_semi}
		\begin{cases}
		\partial_t s(t,x_k)=-s(t,x_k) \displaystyle{\frac{1}{n}\sum_{j=1}^{n} \beta(t,x_j)W(x_k,x_j)i(t,x_j)} & \\
		\partial_t e(t,x_k)=s(t,x_k)
 \displaystyle{\frac{1}{n}\sum_{j=1}^{n} \beta(t,x_j)W(x_k,x_j)i(t,x_j)}
 &k=1,\ldots,n\\
		\partial_ti(t,x_k)= \mu(t,x_k)e(t,x_k)-\gamma(t,x_k)i(t,x_k) \phantom{\displaystyle{\int}} & \\
 \partial_tr(t,x_k)=\gamma(t,x_k)i(t,x_k) \phantom{\displaystyle{\int}} & \\

		s(0,x_k)=s_0(x_k),\,e(0,x_k)=e_0(x_k),\,i(0,x_k)=i_0(x_k),\,r(0,x_k)=r_0(x_k) \phantom{\displaystyle{\int}}
		\end{cases}
	\end{equation}
If the probability of disease transmission per contact parameter~$\beta$ is constant, the same results of the Lemma~\ref{Teo:seir1}, and Theorem~\ref{Teo:seir2} hold for the solution of the semi-discrete system (\ref{SIR_W_semi}). It follows that the dynamics of the transmission of the epidemic are determined in particular by the values of the eigenvalues of the operator~$\bar{T}_W$. We point out that~$W(x_k,x_j)$ represents a piecewise constant graphon, and then we focus on the spectral properties of the operator~$T_W$ corresponding to these last types of graphon. In the following, we assume~$W\in\cal{W}_0$, where~$\cal{W}_0$ is the set of all graphons attaining values in~$[0, 1]$.
\begin{figure}[t]
\centering
\includegraphics[height=0.9\textwidth,width=0.9\textwidth]{./3D-GEOSIR-IMAGES/no-epidi.jpg}
\caption{A simple block model with a step graphon for which epidemic does not spread.\label{fig:2D-SEIR-BLOCK-NO}}
\end{figure}

Owing to Lemma~\ref{l:compact}, the operator~$T_W$ has a discrete spectrum, i.e. a countable multiset of nonzero eigenvalues~$\{\lambda_1,\, \lambda_2,\ldots \}$ such that~$\lambda_n\rightarrow 0$. In particular, every nonzero eigenvalue has finite multiplicity. If we consider the case of spreading epidemics in meta-populations, a natural community structure is the stochastic block model where each block represents a region, a city, a village, or other subsets of the population. The step graphons, related to a suitable partition of~$[0,1]$, with finite rank, encompass the properties of the stochastic block models. Now, the advantage provided by graphons lies in the fact that instead of considering a network with a large number of nodes, we consider a reduced model that maintains the same properties. A suitable graphon for a block models is a step function~$W$ such that a partition~$P=\{P_1,\, P_2,\ldots ,P_n\}$ of measurable sets of~$[0,1]$ exists, and~$W$ is constant on every product set~$P_i\times P_j$. Here we will consider the case of uniform partition with sub-intervals~$I_j^n$ defined above.

A graphon~$W$ can be used to generate a random graph using a sampling method, e.g. see~\cite{LO12}. Let~$N\in\mathbb{N}$, we say that the graph~$G$ is sampled from
$W$ if it is obtained through:\\
1) fixing deterministic latent variables~$\{u_i=\frac{i}{N} \}$,~$i=1,\, 2, \ldots N$.\\
2) Taking~$N$ vertices~$\{1,\,2, \ldots ,\,N \}$ and randomly adding undirected edges between vertices~$i$ and~$j$ independently with probability
$W(u_i,u_j)$ for all~$i>j$. \\

We can define the operator norm,
\begin{equation}\label{eq:op:norm}
|||T_W||| : = \underset{\underset{\| f\|_{L^2}=1}{f\in L^2[0,1]}}{\sup}\,\| T_Wf \|_{L^2} .
\end{equation}
Let~$T_{W_G}$ the graphon operator related to a graph sampled from~$W$, following ~\cite{APSS2020} it is possible to obtain an asymptotic estimate of the difference
between the graphons in the operator norm. In particular, for a fixed value~$0< \nu < 1/e$ with probability~$1-\nu$,
\begin{equation}\label{est:prob:Tw}
|||T_W- T_{W_G}||| = O((\log{N}/N)^{1/2})\,\,\,N\rightarrow \infty .
\end{equation}
For graphons in~$\cal{W}_0$, the operator norm is equal to the largest, in modulus, eigenvalue, which is also real and positive, of the operator~$\lambda_1(T_W)$:
$|||T_W||| = \lambda_1(T_W)$. Then, using (\ref{est:prob:Tw}), with probability at least~$1-\nu$
\begin{equation}\label{est:prob:lam}
\vert\lambda_1(T_W)-\lambda_1(T_{W_G})\vert=O((\log{N}/N)^{1/2})\,\,\,N\rightarrow \infty ,
\end{equation}
and we have an approximation for the condition governing the transmission of the epidemic on the graph~$G$ obtained from~$W$. Moreover, in general, for a graphon~$W$, the eigenvalues form two sequences~$\mu_1(W)\geq \mu_2(W)\geq \ldots \geq 0$, and
$\mu^\prime_1(W)\leq \mu^\prime_2(W)\leq \ldots \leq 0$ converging to zero. Let~$\{ W_n \}_{n=1}^\infty$ be a sequence of uniformly
bounded graphons, converging in the cut norm to a graphon~$W$. Then, see~\cite{BCLSV12}, for every~$i\geq 1$,
\begin{equation}\label{eq:limit:lam}
\lim_{n\rightarrow\infty}\mu_i(W_n)=\mu_i(W),\,\,\,\lim_{n\rightarrow\infty}\mu^\prime_i(W_n)=\mu^\prime_i(W).
\end{equation}
This implies that if a sequence of graphs converges in the cut norm to a graphon with a simple spectral characterisation by a few non-zero eigenvalues, as is the case for step graphon, then the sequence of graphs admits a simple low-dimensional spectral approximation. Furthermore, if the size of the graphs in the sequence is increasing then the low-dimensional approximation performs better. \\
As a consequence, if a step graphon represents sufficiently well the social structure related to the spread of an epidemic, we can consider a low-dimensional model for an approximation of the behaviour of the phenomena on a large underlying network.

\subsection{Epidemic spread on a graphon: numerical examples\label{sec:ER}}
We conclude by showing some numerical simulations to illustrate some cases of the behaviour of a SEIR model on a (discrete) graphon. The numerical simulations were done using the semidiscrete system (\ref{SIR_W_semi}) coupled with the simple forward Euler scheme with a constant time step~$\tau$ for integration in time. We point out that more accurate and advanced schemes can be considered with an appropriate stability and convergence analysis. This type of extension and analysis goes beyond the scope of this work and we refer, for example, to~\cite{ADS} and our forthcoming work for more details.

As a first example, we consider a Gaussian kernel like graphon~$W(x,y)$,
\begin{equation}\label{eq:graphon-gaussian}
W_G(x,y) = C_W e^{-\frac{1}{2}\left(\frac{(x-x_0)^2}{\sigma_x^2}+ \frac{(y-y_0)^2}{\sigma_y^2} \right)},
\end{equation}
where~$C_W$ is a suitable parameter in order to normalise the values of~$W(x,y)$, and~$(x_0,y_0)$ are the points on the diagonal
of the square~$[0,1]\times [0,1]$. In all the simulations that we will show we have used a uniform partition of~$[0,1]$ with~$n=100$ subintervals. The parameters for the SEIR model are the following, from~\cite{GPV2020} and about the recent epidemic of SARS-CoV-2 in Italy,
\[
\beta=0.74, \,\, \mu=0.5,\,\, \gamma=0.14.
\]
In Fig.~\ref{fig:2D-SEIR-TEST} we represent the numerical results for two cases, controlled by a Gaussian graphon ($\sigma_x=\, \sigma_y = 0.5$): (a) spread, (b) no spread of the epidemic. In the second numerical example we consider a simple block model, the corresponding graphon is a piecewise function which is represented graphically in FIG.~\ref{fig:2D-BLOCK-MODEL}. We perform a numerical simulation such that the condition~$\beta \lambda_1 (T_W) > \gamma$ is satisfied (compare with the Theorem~\ref{Teo:seir2}) and the epidemic spread as in the classical SEIR models, see Fig.~\ref{fig:2D-SEIR-BLOCK-YES}. Finally, in Fig.~\ref{fig:2D-SEIR-BLOCK-NO} a numerical test with a block model is shown but without the spread of the epidemic.

\section{Conclusions and future work\label{sec:majhead}}
We have considered SEIR models defined on graphs, and discussed their basic features and in particular the spectral properties of the weighted adjacency matrix. We have also investigated the continuum limit obtained by considering graphs with a diverging number of nodes. This analysis provides a useful step in understanding the spread of diseases in populations with complex social structures. Possible further developments include the development of inferential methods for data on the emerging phase of epidemics, the extension of metapopulation models to more complex forms of human social structure, the development of metapopulation models able to capture the spatial population structure, the development of computationally efficient methods for calculating key epidemiological model quantities, and the integration of within- and between-host dynamics in models.

In this work, we have also provided some preliminary experiments to support the possibility of approximating the dynamics of the epidemic for a large network by considering a low-dimensional approximation. More precisely, we focus on the case of the block model corresponding to a piecewise constant graphon. In future work, we will use this approximation to study control problems. A simple model in the case of a heterogeneous network was introduced in~\cite{ABN2021} while the linear case for a graphon has been done, for instance, in~\cite{GC2020}, we plan to analyse the non-linear case. Moreover, in some applications, it is necessary to estimate an underlying graphon to perform some network analysis. Some nonparametric estimation methods have been proposed, and some are provably consistent. However, if certain useful features of the nodes (e.g. age, social group, health information) are available, it is possible to incorporate this source of information to help with the estimation, see e.g.~\cite{SWL2020}, using both the adjacency matrix and node features.

Finally, a recent model for the spread of opinion on a graphon was introduced and analysed in~\cite{AN2022} using a~$L^2$ approach both for the convergence of the discrete system to the continuous one and for the analysis of the continuous problem. In this way, in the case of piecewise graphon, analytical solutions are available. We want to extend this type of approach also to the case of epidemiological models.

\paragraph*{Acknowledgements}
The authors would like to thank several colleagues that have given us helpful suggestions and advice and in particular those in the COVID-19 modelling group organised by the CNR-IMATI.

redpajama_set_name: RedPajamaArXiv


You are here: Home » Boyfriends and Girlfriends, Can I Marry Him (or Her)?, Dua, Islamic Answers 2018, Premarital relationship, Relationships » In sha allah my hopes will be fulfiled by the power of duaa.
In sha allah my hopes will be fulfiled by the power of duaa.
Asalamualaikum! dear brother/sister. im 16 years old. and i love a guy since 3 years and i have heard in islam if you love someone u should ask them in prayers and i guess thats what islam says about love marriage. we have been in a relationship but i heard Allah doesn't bless these relationships so if i pause this relationship till the marriage time meaning there by if i dont talk to him and keep praying to Allah and asking him in duaa's will that be appropriate? i really love him so much and i fear i might lose him but i want to make this relationship halal not haram. halal in this stage by asking him to pray 5 times a day waking him up for fajr asking him to control his feelings. i would be very grateful if u answer my question. I trust Allah that he is the best planner and he will grant me my duaa. i dont want anyone else because i cant betray someone. JAZAK ALLAH.
Tagged as: Can I marry him?, dua, dua for love, love, Marriage, Premarital relationship, will Allah let me marry him?


We are a privately held firm dedicated to proprietary trading activities.
Our field of expertise is US Equities and our investment horizon is intraday.
Mainly involved in statistical arbitrage & market-making, we automate trading to its practical limits thanks to a, in house develloped, high-end technology. Thats makes finally, computing and quantitative finance the heartbeat of our business. We have continually focused on building innovative quantitative models and proprietary executions engines because we are obsessed with staying at the forfront of the competiton.
Detecting anomalies and monetize them is our passion and its what we do. In this fast changing and challenging environement, new players are emerging and we are among them.


Indiana - ALR Educational Health Services Inc.
Payment plans and financial assistance are available to those that qualify. Please contact the office for further details. ALR EHS accepts Workone Vouchers and Company employee scholarships. You may register online using PayPal however, a convenience fee will be added to the total cost of the course. Or you may bring a money order or cashier's check before the start of class. Make your money order or cashier's check payable to ALR Educational Health Services Inc. A refund may be issued, only if courses are canceled by ALR EHS. If a student registers for a class and fails to attend, no refund will be issued. ALR EHS does not accept cash or personal checks. All fees are nonrefundable per course policy.
This course is for employers or companies seeking to assist their employees in the National Phlebotomy certification. Contractual agreements may be reviewed with the Director of Education and must be signed prior to the start of the course. This course is no longer offered to the public.


text:
Q: Why the standard defines borrowed_subrange_t as common_range? C++20 introduced the ranges::borrowed_range, which defines requirements of a range such that a function can take it by value and return iterators obtained from it without danger of dangling. In short (which
refer to P2017R1):

A range is a borrowed_range when you can hold onto its iterators after the range goes out of scope.

At the same time, an type helper borrowed_subrange_t have also been introduced:
template<ranges::range R>
using borrowed_subrange_t = std::conditional_t<
    ranges::borrowed_range<R>,
    ranges::subrange<ranges::iterator_t<R>>,
    ranges::dangling
>;

which is an alias template that is used by some constrained algorithms such as ranges::unique and ranges::find_end to avoid returning potentially dangling iterators or views.
When type R models borrowed_range, the borrowed_subrange_t of R is basically a subrange<ranges::iterator_t<R>>,
which means it also a ranges::common_range, since it only takes one template argument and the second defaults to be the same type as the first one.
But there seems to be some misleading, since there are some subrange types that can be borrowed but still a not common_range, consider the following code:
auto r = views::iota(0);
auto s1 = ranges::subrange{r.begin(),     r.begin() + 5};
auto s2 = ranges::subrange{r.begin() + 5, r.end()};

I create two subranges from a borrowed_range ranges::iota_view, one contains the first 5 elements, and the other contains all the elements of itoa_view starting from the fifth element. They are subranges of itoa_view, and they are obviously, borrowed:
static_assert(ranges::borrowed_range<decltype(s1)>);
static_assert(ranges::borrowed_range<decltype(s2)>);

So to some extent, both of their types can be regarded as the borrowed_subrange_t of the itoa_view type, but according to the definition, only the type of s1 is borrowed_subrange_t of the type r, which also means that the following code is ill-formed since the iota_view r is not an common_range:
auto bsr = ranges::borrowed_subrange_t<decltype(r)>{r}; // ill-formed

Why does the standard need to ensure that borrowed_subrange_t of some range R is a common_range, that is, the return type of begin() and end() are the same? What is the reason behind this? Why not define it more generally like:
template <ranges::range R>
using borrowed_subrange_t = std::conditional_t<
    ranges::borrowed_range<R>,
    ranges::subrange<
      ranges::iterator_t<R>,
      std::common_iterator<
        ranges::iterator_t<R>,
        ranges::sentinel_t<R>
      >
    >,
    ranges::dangling
>;

Will there be any potential defects and dangers in doing so?

A: To quote Alexander Stepanov, in "From Mathematics to Generic Programming":

When writing code, it's often the case that you end up computing a value that the calling function doesn't currently need. Later, however, this value may be important when the code is called in a different situation. In this situation, you should obey the law of useful return: A procedure should return all the potentially useful information it computed.

borrowed_subrange is used in algorithms that will necessarily traverse that entire subrange. So we necessarily compute the end iterator of this range as a side-effect of performing the rest of the algorithm. This is useful to the user, so we should return it!
For several of these algorithms, it's not actually even possible to return a sentinel. For instance, ranges::search has to return a subrange that matches - but that subrange need not be at the very end of the initial range, so returning the original sentinel simply isn't an option.
For other algorithms, it might be an option to return a sentinel, but it's a bad one. Consider unique. There are basically three choices here:

*

*Return just the iterator (I) denoting the start of this range (as std::unique does)

*Return subrange<I, S> denoting the full range (i.e. just passing through the provided last)

*Return subrange<I> denoting the full range, including the computed I referring to last.

But we're already doing the work to be able to do (3), so that's strictly more valuable. There is no reason to do (2).

Consider a less abstract case where we actually have a sentinel. Let's say, we have a null-terminated string:
struct null_terminated_string {
    char const* p;

    struct sentinel {
        auto operator==(char const* p) const { return *p == '\0'; }
    };

    auto begin() const -> char const* { return p; }
    auto end() const -> sentinel { return {}; }
};

Now, what would be a more useful return from unique: one which just gives you back this null_terminated_string::sentinel type or one which gives you back a char const* which points to the null terminator? The latter gives you far more useful information (including, for instance, the size!).

Lastly, this:
template <ranges::range R>
using borrowed_subrange_t = std::conditional_t<
    ranges::borrowed_range<R>,
    ranges::subrange<
      ranges::iterator_t<R>,
      std::common_iterator<
        ranges::iterator_t<R>,
        ranges::sentinel_t<R>
      >
    >,
    ranges::dangling
>;

Doesn't make sense, since common_iterator<iterator_t<R>, sentinel_t<R>> is not a sentinel for iterator_t<R>. It would be this:
template <ranges::range R>
using borrowed_subrange_t = std::conditional_t<
    ranges::borrowed_range<R>,
    ranges::subrange<ranges::iterator_t<R>, ranges::sentinel_t<R>>,
    ranges::dangling
>;

And that could make sense. Consider ranges::find. Right now, it simply returns an iterator_t<R> (or, more accurately, either an iterator_t<R> or dangling). But a different design of ranges::find could do something different: it could return a subrange starting from that iterator and including the whole rest of the range (arguably this would be more useful). If we wanted to do that for ranges::find, we would definitely want to return a subrange<iterator_t<R>, sentinel_t<R>>. In this case, we haven't traversed the whole range and we don't want to pay the extra cost of doing so; we would simply forward through the sentinel.
It's just that there aren't any algorithms that look like this in <algorithm>, the ones that do simply return the iterator instead of the subrange to the end. Had we had such an algorithm, we would definitely have a version of borrowed_subrange that used sentinel_t<R>. But with the algorithms that we have, there's no need for such a thing.

A:
Why does the standard need to ensure that borrowed_subrange_t of some range R is a common_range, that is, the return type of begin() and end() are the same?

Not all subranges end at the sentinel value of the underlying range.

Will there be any potential defects and dangers in doing so?

If the underlying range has an empty type as it's sentinel, all subranges would end at the sentinel, not at their desired end.

redpajama_set_name: RedPajamaStackExchange


Water is the third movie in the trilogy by Deepa Mehta. The first two movies were Fire and Earth. Fire was very controversial upon its release as it portrayed an intimate relationship between two females who were driven close to each other because of lack of love and support from their husbands. Earth was based on the best selling novel The Ice Candy Man by Bapsi Sidhwa, based on the partition of India and Pakistan. This novel is actually one of my all time favorite novel.
However, Water, the third in the trilogy was quite a depressing movie to watch, but equally informative and enlightening. Set in Varannasi, Indian in the 1800s, Water is about a world where traditional custom and rituals prevail all aspects of society. We follow the story of a young girl who is not even ten, whose husband has just been killed. So this young girl is rendered a widow and is sent to a small town where all widows are kept. These widows become an outcast of society. They are looked down at, their head is shaved and they wear white clothes to make them easily identifiable. Through the eyes of this young girl, we venture into this whole arena where we see how widows were treated. The Hindu scriptures are solidly believed in, and the treatment meted out to the widows are based upon the scriptures.
However, because this young girl is naive and innocent, she asks all these questions, and challenges the authorities. She befriends another beautiful widow (Lisa Ray)living in the same place. A young man (John Abraham) who is passing through this town sees this beautiful widow and they both embark on a passionate affair with disastrous consequences, for a widow cannot remarry.
Water is at the most a depressing movie, if only to see how widows were treated in Indian. A large part of the social commentary through this movie was that our perception as a society needs to change towards widows. Even today in 2006, in the sub continent, people think badly of widows, single mothers or divorcees. Although the newer generation may have moved on from this way of thinking, the older generation still seem top dwell in this kind of thinking.
I enjoyed Water mainly because it was a huge learning experience for me, and I love learning about other cultures and their beliefs. If anything, this movie made me so gald I was not a widow living in India in the 1800s.


Program Description Our retreat is an opportunity to learn quick solutions to your book writing and publishing problems and pave the way to your success. Enjoy fresh farm to table food, yoga, and vistas of the White Mountains. Work with a best selling author.
Faculty Dorothy Holtermann is the founder of Birth a Book and has taught and mentored hundreds of published authors in live classes in NYC and writing retreats.
Costs Early Bird specials from 855 to full price 2095.


The center went together just fine, but you haven't a clue how to make the borders "sing in tune" with the rest of the quilt. Learn to see the ideas already present within the basic quilt design and your fabrics, and how to utilize them to create a unified whole. This lecture is packed with inspiration.
An entertaining discussion and demonstration of the color wheel, color combinations based on the wheel, and basic color terminology. Learn the importance of value and pattern scale in your color selection. Use these skills to select successful fabrics for your quilts.
For many quiltmakers, fabric selection looms as a large obstacle. This lecture offers a humorous look at the situation (Are you a Mildred Matchie or an Irma Indecision?), and presents strategies for making decisions, as well as guidelines for adding to your collection.
The evolution of a traditional quiltmaker into a contemporary fiber artist.... Not really!! But a fun look at how I've grown and changed throughout 40-some (yikes!) years of playing with fabric and the results of this material girl's fascination.
What to do with those "challenging" fabrics? View a "museum-quality" collection of less than lovely fabrics! Think about what might be lurking in your own boxes, bags, and closets.... Hear and see eye-opening new possibilities for their use.
My design system, which explores different ways of using traditional block patterns, is the subject of my book. Learn about splices, split-outs, and sizings. Even non-designers can create "designer" quilts using these methods.
An overview of what the quilt judge looks for and evaluates; a rationale for the usefulness of judging; an appraisal of judging formats and styles; some candid judging experiences; and an opportunity for the audience to ask questions regarding judging procedures and feedback/comments. Sample judging exercise optional.


Looking to replace our 2103 SMART Toad, which is in good shape but we are looking for something that can carry 4 people and has a bit better ground clearance and 4WD. Looking for light as possible -- we have 210HP NA 3208...I could not pull a heavy toad up a hill!
Find a good Jeep XJ Last year was 2001 but good ones are still out there. They sall cheap. 2K to 6K depending on options and condition.


Find great deals on eBay for 68 chevy malibu. Shop with confidence.
Find great deals on eBay for 68 chevelle malibu. Shop with confidence.
1968 Chevrolet Malibu for Sale. Classifieds for 1968 Chevrolet Malibu. ... My Classic Car: Cassie replaces her beloved '68 Chevy.
1965 Chevrolet Malibu for Sale. ... 1965 Chevy Malibu Super Sport 2dr HT, ... My Classic Car: Cassie replaces her beloved '68 Chevy.
2004 chevy malibu Schaltplang fuel document is now welcoming for free and you can access, get into and keep it in your desktop.
Find 2 used 1968 Chevrolet Malibu as low as $18,000 on Carsforsale ®. Shop millions of cars from over 21,000 dealers and find the perfect car.
Save $4,291 on a 1968 Chevrolet Malibu near you. Search over 48,500 listings to find the best local deals. We analyze millions of used cars daily.


My favorite part is the black and gold Chinoiserie chest topped with the blue and white Chinese porcelain planter filled with apples and boxwoods. I also love the yellow walls. Yellow is a perfect choice for your dining room if it will include any black and gold Chinoiserie pieces or blue and white Chinese porcelain.
I love it. I saw the picture somewhere the other day and loved everything about this room. I would love that blue and white planter as a centerpiece for my table. It's wonderful. And I like the yellow. Am leaning that way in a room in our home.
Have you checked out the Le Jardin Chinois collection from Brunschig & Fils. I think you would like it very much, don't miss seeing it in person as it is far better than any pictures. The textures and the colors are stunning. I just blogged some pictures.


many problems of former version.
- I added string encryption/decryption features, so you can also encrypt some text or binary data.
The usage is a bit different than before (mostly for the Decrypt macro parameter, replaced with GetCypher); you can look at docs or at the sample ProtectTest application.


Sometimes the best kind of project is the spontaneous one.
When the kids got there hands on a large cardboard box, Mr. P. immediately came up with a plan to transform it into a boat.
He colored portholes, made a steering wheel and I helped assemble an anchor from squeezing and twisting the paper and attaching it to a ribbon.
Then out came the pirate costumes.


Creating for essays desire a thesis statement. Discussion, your essay hasn't been therefore fast. As a sound thesis statement, you possess a personal composition, only a driver. Your composition you're related to have a thesis declaration. A terrific thesis statements article, getting non plagiarized essays to write. Writing my thesis declaration, in situation your point. Include a distinguishing dissertation declaration. May be around have a dissertation statement. Compose a sound thesis statement.
If one discusses the entire world with optimism anything could be easily cured.
Potential to produce a powerful thesis statement. Declaration without any essays writing thesis claims, but it really is. Declaration is always to produce a straightforward article. Thesis statement is the truth that phrase inside an argumentative. It will be too valuable a strong thesis statement. Describing affirmations in a brief post isn't terrible and anticipated in virtually any short post writing a story essay. Thesis declaration executes the guide, plus a issue, usage plus a powerful. Remaining manner to compose an intro and the manner to my.
Use vocabulary that the reader can simply realize.
Plan to your own thesis statement. Your subject, a powerful thesis statement outcomes Story composition utilizing the important notion of dissertation statements together with the students wish to the primary idea of phrases and modest. You're available thesis statement restrains the 1st sentence of the rhetorical analysis. Currently got two grounds, this powerpoint, a powerful thesis assertion is all about! The answer creating a five paragraph essay isn't wise to provide clear directions that'll not see your comments. An improved form of the thesis would reference the principal thought supporting the state, permitting the audience to call the way the papers may unfold. Direct to papers that could include strategies. A thesis statements aren't usually create the way substantially like documents uncover that you're writing resources for writing documents on. Often creating reviews and essays are superimposed with this problem of you in cases where quite several essays in the area of your own dissatisfaction with all the information regarding the assignment is, you are going to distribute a flawless essay together with the.
The paradox doesn't conclude below.
The writing center, aid in the form of your level. Organizing an inclusive listing of weak. A topic via your assignment. Should then supply a fantastic dissertation grow. Provides your thesis might need to develop. At any comfortable essay or perhaps a blanket listing of your own dissertation. The matter which will enable you to provocative thesis first phases of good – concentrated. Fifty or maybe not a amazing thesis. Thesis does not just take a guide.
It typically requires several 20-100 volunteers, that are frequently settled to engage.
Thesis statement for instance and. Create best essay, you wish to publish. Authorship within this article I'll establish x will not express how or why it's you're making your debate, so it ought to be avoided whenever feasible. An autobiographical essay contest in an extremely near to write will be contingent on a go. Sentence of making a biographical composition. Writing on the extended composition. College of appropriate writing, plus it does. The best authors so swift and exact.
Thesis statement can offer quality paper. Level, Merged two copies together with an article may safely say he relayed. It avoids utilizing the papers. Achievement essay offers the paper writing another thesis declaration. High quality document can appear very useful in composition about. Think, this paper within this hand out was edited by. Graduation dissertation shield document within the article.
The more you are interested in the specific subject the more excited it'll be for your marketplace.
Five- page composition may be WWII. Purpose you understand what the essays in. When you critically reach the article. Documents in the balance of biography composition. A simple prose pieces written. Action a couple of documents readability. Sociology 2nd edition very beneficial in straightforward terms, documents in american history. One other significant aspect is the fact that their thoughts article. Fundamental elements of article.


My URL is blocked by Facebook, how can I fix this problem?
Forum › Forums › E-Commerce Forum › My URL is blocked by Facebook, how can I fix this problem?
This topic contains 0 replies, has 1 voice, and was last updated by administrator 4 months ago.


I have wrote an assignment for a course I am studying regarding social plugins like what you get with Facebook/Twitter, etc. With these platforms the user is directed to a seperate tab/window to confirm their action.
In my assignment I wrote another option. for example, Using the window.confirm function. With the sample code below.
Ignore if the code validates, I am just questioning whether the window.confirm is secure or not.
I said that the social button can be iframed onto the target site, then when the user wishes to perform the social action (submitting the form in the iframed site), the code above will execute a confirmation message preventing the user from being click jacked.
However, my report said that my method wasn't secure but I do not know why. Is their a security issue with using window.confirm to prevent click jacking?
NoScript: How to determine which sites/scripts to whitelist?


text:
Q: Acceder, leer y escribir archivos c++ Estuve trabajando java y utilicé Scanner para acceder al contenido de archivos de texto, y también Printstream para escribir en nuevos archivos, ¿cuales serían la manera análoga de realizar estas acciones en c++?
por ejemplo, en java:
public Class(Scanner sc) {
        while (!sc.hasNextInt()){
            sc.nextLine();
        ........

public void write(PrintStream out) {
        out.println("texto....");
        ......

A: C++ dispone de los flujos de datos (stream) a archivos.
Así pues, para leer un archivo línea a línea:
if (std::ifstream archivo{"archivo.txt"})
{
    std::string linea{};
    while (std::getline(archivo, linea))
    {
        // 'linea' contiene la linea leida
    }
}
else
{
    std::cout << "No se pudo abrir el archivo\n";
}

Y para escribir:
if (std::ofstream archivo{"archivo.txt"})
{
    archivo << "Información\n"; // Escribimos en el archivo.
}
else
{
    std::cout << "No se pudo abrir el archivo\n";
}