def calculate_connvectivity_radius(self, amount_clusters, maximum_iterations = <NUM_LIT:100>):
maximum_distance = max(self.__ordering)<EOL>upper_distance = maximum_distance<EOL>lower_distance = <NUM_LIT:0.0><EOL>result = None<EOL>amount, borders = self.extract_cluster_amount(maximum_distance)<EOL>if amount <= amount_clusters:<EOL><INDENT>for _ in range(maximum_iterations):<EOL><INDENT>radius = (lower_distance + upper_distance) / <NUM_LIT><EOL>amount, borders = self.extract_cluster_amount(radius)<EOL>if amount == amount_clusters:<EOL><INDENT>result = radius<EOL>break<EOL><DEDENT>elif amount == <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT>elif amount > amount_clusters:<EOL><INDENT>lower_distance = radius<EOL><DEDENT>elif amount < amount_clusters:<EOL><INDENT>upper_distance = radius<EOL><DEDENT><DEDENT><DEDENT>return result, borders<EOL>
!
        @brief Calculates connectivity radius of allocation specified amount of clusters using ordering diagram and marks borders of clusters using indexes of values of ordering diagram.
        @details Parameter 'maximum_iterations' is used to protect from hanging when it is impossible to allocate specified number of clusters.

        @param[in] amount_clusters (uint): amount of clusters that should be allocated by calculated connectivity radius.
        @param[in] maximum_iterations (uint): maximum number of iteration for searching connectivity radius to allocated specified amount of clusters (by default it is restricted by 100 iterations).

        @return (double, list) Value of connectivity radius and borders of clusters like (radius, borders), radius may be 'None' as well as borders may be '[]'
                                if connectivity radius hasn't been found for the specified amount of iterations.