def _competition(self, x):
index = <NUM_LIT:0><EOL>minimum = euclidean_distance_square(self._weights[<NUM_LIT:0>], x)<EOL>for i in range(<NUM_LIT:1>, self._size, <NUM_LIT:1>):<EOL><INDENT>candidate = euclidean_distance_square(self._weights[i], x)<EOL>if candidate < minimum:<EOL><INDENT>index = i<EOL>minimum = candidate<EOL><DEDENT><DEDENT>return index<EOL>
!
        @brief Calculates neuron winner (distance, neuron index).

        @param[in] x (list): Input pattern from the input data set, for example it can be coordinates of point.

        @return (uint) Returns index of neuron that is winner.