def __update_medians(self):
medians = [[] for i in range(len(self.__clusters))]<EOL>for index in range(len(self.__clusters)):<EOL><INDENT>medians[index] = [<NUM_LIT:0.0> for i in range(len(self.__pointer_data[<NUM_LIT:0>]))]<EOL>length_cluster = len(self.__clusters[index])<EOL>for index_dimension in range(len(self.__pointer_data[<NUM_LIT:0>])):<EOL><INDENT>sorted_cluster = sorted(self.__clusters[index], key=lambda x: self.__pointer_data[x][index_dimension])<EOL>relative_index_median = int(math.floor((length_cluster - <NUM_LIT:1>) / <NUM_LIT:2>))<EOL>index_median = sorted_cluster[relative_index_median]<EOL>if (length_cluster % <NUM_LIT:2>) == <NUM_LIT:0>:<EOL><INDENT>index_median_second = sorted_cluster[relative_index_median + <NUM_LIT:1>]<EOL>medians[index][index_dimension] = (self.__pointer_data[index_median][index_dimension] + self.__pointer_data[index_median_second][index_dimension]) / <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>medians[index][index_dimension] = self.__pointer_data[index_median][index_dimension]<EOL><DEDENT><DEDENT><DEDENT>return medians<EOL>
!
        @brief Calculate medians of clusters in line with contained objects.

        @return (list) list of medians for current number of clusters.