class_docstr: !
  @brief Class represents clustering algorithm CURE with KD-tree optimization.
  @details CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.
  
  Here is an example how to perform cluster analysis of sample 'Lsun':
  @code
      from pyclustering.cluster import cluster_visualizer;
      from pyclustering.cluster.cure import cure;
      from pyclustering.utils import read_sample;
      from pyclustering.samples.definitions import FCPS_SAMPLES;
  
      # Input data in following format [ [0.1, 0.5], [0.3, 0.1], ... ].
      input_data = read_sample(FCPS_SAMPLES.SAMPLE_LSUN);
  
      # Allocate three clusters.
      cure_instance = cure(input_data, 3);
      cure_instance.process();
      clusters = cure_instance.get_clusters();
  
      # Visualize allocated clusters.
      visualizer = cluster_visualizer();
      visualizer.append_clusters(clusters, input_data);
      visualizer.show();
  @endcode
class_docstr_tok: ["!","@","brief","Class","represents","clustering","algorithm","CURE","with","KD-tree","optimization",".","@","details","CCORE","option","can","be","used","to","use","the","pyclustering","core","-","C\/C++","shared","library","for","processing","that","significantly","increases","performance",".","Here","is","an","example","how","to","perform","cluster","analysis","of","sample","'Lsun","'",":","@","code","from","pyclustering.cluster","import","cluster_visualizer",";","from","pyclustering.cluster.cure","import","cure",";","from","pyclustering.utils","import","read_sample",";","from","pyclustering.samples.definitions","import","FCPS_SAMPLES",";","#","Input","data","in","following","format","[","[","0.1",",","0.5","]",",","[","0.3",",","0.1","]",",","...","]",".","input_data","=","read_sample","(","FCPS_SAMPLES.SAMPLE_LSUN",")",";","#","Allocate","three","clusters",".","cure_instance","=","cure","(","input_data",",","3",")",";","cure_instance.process","(",")",";","clusters","=","cure_instance.get_clusters","(",")",";","#","Visualize","allocated","clusters",".","visualizer","=","cluster_visualizer","(",")",";","visualizer.append_clusters","(","clusters",",","input_data",")",";","visualizer.show","(",")",";","@","endcode"]
docstr: !
  @brief Constructor of clustering algorithm CURE.
  
  @param[in] data (array_like): Input data that should be processed.
  @param[in] number_cluster (uint): Number of clusters that should be allocated.
  @param[in] number_represent_points (uint): Number of representative points for each cluster.
  @param[in] compression (double): Coefficient defines level of shrinking of representation points toward the mean of the new created cluster after merging on each step. Usually it destributed from 0 to 1.
  @param[in] ccore (bool): If True then CCORE (C++ solution) will be used for solving.
docstr_tok: ["!","@","brief","Constructor","of","clustering","algorithm","CURE",".","@","param","[","in","]","data","(","array_like",")",":","Input","data","that","should","be","processed",".","@","param","[","in","]","number_cluster","(","uint",")",":","Number","of","clusters","that","should","be","allocated",".","@","param","[","in","]","number_represent_points","(","uint",")",":","Number","of","representative","points","for","each","cluster",".","@","param","[","in","]","compression","(","double",")",":","Coefficient","defines","level","of","shrinking","of","representation","points","toward","the","mean","of","the","new","created","cluster","after","merging","on","each","step",".","Usually","it","destributed","from","0","to","1",".","@","param","[","in","]","ccore","(","bool",")",":","If","True","then","CCORE","(","C++","solution",")","will","be","used","for","solving","."]
code: def __init__(
      self,
      data,
      number_cluster,
      number_represent_points=5,
      compression=0.5,
      ccore=True,
  ):
      """!
      @brief Constructor of clustering algorithm CURE.
  
      @param[in] data (array_like): Input data that should be processed.
      @param[in] number_cluster (uint): Number of clusters that should be allocated.
      @param[in] number_represent_points (uint): Number of representative points for each cluster.
      @param[in] compression (double): Coefficient defines level of shrinking of representation points toward the mean of the new created cluster after merging on each step. Usually it destributed from 0 to 1.
      @param[in] ccore (bool): If True then CCORE (C++ solution) will be used for solving.
  
      """
  
      self.__pointer_data = self.__prepare_data_points(data)
  
      self.__clusters = None
      self.__representors = None
      self.__means = None
  
      self.__number_cluster = number_cluster
      self.__number_represent_points = number_represent_points
      self.__compression = compression
  
      self.__ccore = ccore
      if self.__ccore:
          self.__ccore = ccore_library.workable()
  
      self.__validate_arguments()
  
imports: import numpy
  from pyclustering.cluster.encoder import type_encoding
  from pyclustering.utils import euclidean_distance_square
  from pyclustering.container.kdtree import kdtree
  from pyclustering.core.wrapper import ccore_library
  import pyclustering.core.cure_wrapper
label_desc: Use image node_id 1 to create a new cure object  with example: obj = cure(data, number_cluster, number_represent_points, compression, ccore)