def process(self):
if self.__ccore is True:<EOL><INDENT>ccore_metric = metric_wrapper.create_instance(self.__metric)<EOL>self.__clusters, self.__medians = wrapper.kmedians(self.__pointer_data, self.__medians, self.__tolerance, self.__itermax, ccore_metric.get_pointer())<EOL><DEDENT>else:<EOL><INDENT>changes = float('<STR_LIT>')<EOL>if len(self.__pointer_data[<NUM_LIT:0>]) != len(self.__medians[<NUM_LIT:0>]):<EOL><INDENT>raise NameError('<STR_LIT>')<EOL><DEDENT>iterations = <NUM_LIT:0><EOL>while changes > self.__tolerance and iterations < self.__itermax:<EOL><INDENT>self.__clusters = self.__update_clusters()<EOL>updated_centers = self.__update_medians()<EOL>changes = max([self.__metric(self.__medians[index], updated_centers[index]) for index in range(len(updated_centers))])<EOL>self.__medians = updated_centers<EOL>iterations += <NUM_LIT:1><EOL><DEDENT><DEDENT>return self<EOL>
!
        @brief Performs cluster analysis in line with rules of K-Medians algorithm.

        @return (kmedians) Returns itself (K-Medians instance).

        @remark Results of clustering can be obtained using corresponding get methods.

        @see get_clusters()
        @see get_medians()