class_docstr: !
  @brief Class represents clustering algorithm CLARANS (a method for clustering objects for spatial data mining).
class_docstr_tok: ["!","@","brief","Class","represents","clustering","algorithm","CLARANS","(","a","method","for","clustering","objects","for","spatial","data","mining",")","."]
docstr: !
  @brief Constructor of clustering algorithm CLARANS.
  @details The higher the value of maxneighbor, the closer is CLARANS to K-Medoids, and the longer is each search of a local minima.
  
  @param[in] data (list): Input data that is presented as list of points (objects), each point should be represented by list or tuple.
  @param[in] number_clusters (uint): Amount of clusters that should be allocated.
  @param[in] numlocal (uint): The number of local minima obtained (amount of iterations for solving the problem).
  @param[in] maxneighbor (uint): The maximum number of neighbors examined.
docstr_tok: ["!","@","brief","Constructor","of","clustering","algorithm","CLARANS",".","@","details","The","higher","the","value","of","maxneighbor",",","the","closer","is","CLARANS","to","K-Medoids",",","and","the","longer","is","each","search","of","a","local","minima",".","@","param","[","in","]","data","(","list",")",":","Input","data","that","is","presented","as","list","of","points","(","objects",")",",","each","point","should","be","represented","by","list","or","tuple",".","@","param","[","in","]","number_clusters","(","uint",")",":","Amount","of","clusters","that","should","be","allocated",".","@","param","[","in","]","numlocal","(","uint",")",":","The","number","of","local","minima","obtained","(","amount","of","iterations","for","solving","the","problem",")",".","@","param","[","in","]","maxneighbor","(","uint",")",":","The","maximum","number","of","neighbors","examined","."]
code: def __init__(self, data, number_clusters, numlocal, maxneighbor):
      """!
      @brief Constructor of clustering algorithm CLARANS.
      @details The higher the value of maxneighbor, the closer is CLARANS to K-Medoids, and the longer is each search of a local minima.
  
      @param[in] data (list): Input data that is presented as list of points (objects), each point should be represented by list or tuple.
      @param[in] number_clusters (uint): Amount of clusters that should be allocated.
      @param[in] numlocal (uint): The number of local minima obtained (amount of iterations for solving the problem).
      @param[in] maxneighbor (uint): The maximum number of neighbors examined.
  
      """
  
      self.__pointer_data = data
      self.__numlocal = numlocal
      self.__maxneighbor = maxneighbor
      self.__number_clusters = number_clusters
  
      self.__clusters = []
      self.__current = []
      self.__belong = []
  
      self.__optimal_medoids = []
      self.__optimal_estimation = float("inf")
  
      self.__verify_arguments()
  
file_path: pyclustering/pyclustering/cluster/clarans.py
imports: import random
  from pyclustering.cluster.encoder import type_encoding
  from pyclustering.utils import euclidean_distance_square
label_desc: Use image node_id 1 to create a new clarans object  with example: obj = clarans(data, number_clusters, numlocal, maxneighbor)