def __create_grid_four_connections(self):
side_size = self.__width;<EOL>if (self._conn_represent == conn_represent.MATRIX):<EOL><INDENT>self._osc_conn = [[<NUM_LIT:0>] * self._num_osc for index in range(<NUM_LIT:0>, self._num_osc, <NUM_LIT:1>)];<EOL><DEDENT>elif (self._conn_represent == conn_represent.LIST):<EOL><INDENT>self._osc_conn = [[] for index in range(<NUM_LIT:0>, self._num_osc, <NUM_LIT:1>)];<EOL><DEDENT>else:<EOL><INDENT>raise NameError("<STR_LIT>");<EOL><DEDENT>for index in range(<NUM_LIT:0>, self._num_osc, <NUM_LIT:1>):<EOL><INDENT>upper_index = index - side_size;<EOL>lower_index = index + side_size;<EOL>left_index = index - <NUM_LIT:1>;<EOL>right_index = index + <NUM_LIT:1>;<EOL>node_row_index = math.ceil(index / side_size);<EOL>if (upper_index >= <NUM_LIT:0>):<EOL><INDENT>self.__create_connection(index, upper_index);<EOL><DEDENT>if (lower_index < self._num_osc):<EOL><INDENT>self.__create_connection(index, lower_index);<EOL><DEDENT>if ( (left_index >= <NUM_LIT:0>) and (math.ceil(left_index / side_size) == node_row_index) ):<EOL><INDENT>self.__create_connection(index, left_index);<EOL><DEDENT>if ( (right_index < self._num_osc) and (math.ceil(right_index / side_size) == node_row_index) ):<EOL><INDENT>self.__create_connection(index, right_index);<EOL><DEDENT><DEDENT>
!
        @brief Creates network with connections that make up four grid structure.
        @details Each oscillator may be connected with four neighbors in line with 'grid' structure: right, upper, left, lower.