def get_diameter(self):
if (self.__diameter is not None):<EOL><INDENT>return self.__diameter;<EOL><DEDENT>diameter_part = <NUM_LIT:0.0>;<EOL>if (type(self.linear_sum) == list):<EOL><INDENT>diameter_part = self.square_sum * self.number_points - <NUM_LIT> * sum(list_math_multiplication(self.linear_sum, self.linear_sum)) + self.square_sum * self.number_points;<EOL><DEDENT>else:<EOL><INDENT>diameter_part = self.square_sum * self.number_points - <NUM_LIT> * self.linear_sum * self.linear_sum + self.square_sum * self.number_points;<EOL><DEDENT>self.__diameter = ( diameter_part / (self.number_points * (self.number_points - <NUM_LIT:1>)) ) ** <NUM_LIT:0.5>;<EOL>return self.__diameter<EOL>
!
        @brief Calculates diameter of cluster that is represented by the entry.
        @details It's calculated once when it's requested after the last changes.

        @return (double) Diameter of cluster that is represented by the entry.