def check_central_position(m, n, i, j, width):
    """
    checking if  the  distribution given by the   `i,j` and  `width`  will be inside the  grid
    defined  by the `n` and `m`.

    :math:`i\in[1..m]`, :math:`j\in[1..n]`, where `m` -- number of cells along latitude  and
     `n` is the number of cells along longitude.

    :param m: number of cells along latitude
    :param n: number of cells along  longitude
    :param i: current position along latitude
    :param j: current position along longitude
    :param width: width of the distribution of state
    :return: True or False

    """


    result = (i + width < m) & (i - width >= 0) & (j + width < n) & (j - width >= 0)

    return result