class_docstr: !
  @brief Class represents clustering algorithm DBSCAN.
  @details This DBSCAN algorithm is KD-tree optimized.
           
           By default C/C++ pyclustering library is used for processing that significantly increases performance.
  
  Clustering example where DBSCAN algorithm is used to process `Chainlink` data from `FCPS` collection:
  @code
      from pyclustering.cluster.dbscan import dbscan
      from pyclustering.cluster import cluster_visualizer
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import FCPS_SAMPLES
  
      # Sample for cluster analysis.
      sample = read_sample(FCPS_SAMPLES.SAMPLE_CHAINLINK)
  
      # Create DBSCAN algorithm.
      dbscan_instance = dbscan(sample, 0.7, 3)
  
      # Start processing by DBSCAN.
      dbscan_instance.process()
  
      # Obtain results of clustering.
      clusters = dbscan_instance.get_clusters()
      noise = dbscan_instance.get_noise()
  
      # Visualize clustering results
      visualizer = cluster_visualizer()
      visualizer.append_clusters(clusters, sample)
      visualizer.append_cluster(noise, sample, marker='x')
      visualizer.show()
  @endcode
class_docstr_tok: ["!","@","brief","Class","represents","clustering","algorithm","DBSCAN",".","@","details","This","DBSCAN","algorithm","is","KD-tree","optimized",".","By","default","C\/C++","pyclustering","library","is","used","for","processing","that","significantly","increases","performance",".","Clustering","example","where","DBSCAN","algorithm","is","used","to","process","`","Chainlink","`","data","from","`","FCPS","`","collection",":","@","code","from","pyclustering.cluster.dbscan","import","dbscan","from","pyclustering.cluster","import","cluster_visualizer","from","pyclustering.utils","import","read_sample","from","pyclustering.samples.definitions","import","FCPS_SAMPLES","#","Sample","for","cluster","analysis",".","sample","=","read_sample","(","FCPS_SAMPLES.SAMPLE_CHAINLINK",")","#","Create","DBSCAN","algorithm",".","dbscan_instance","=","dbscan","(","sample",",","0.7",",","3",")","#","Start","processing","by","DBSCAN",".","dbscan_instance.process","(",")","#","Obtain","results","of","clustering",".","clusters","=","dbscan_instance.get_clusters","(",")","noise","=","dbscan_instance.get_noise","(",")","#","Visualize","clustering","results","visualizer","=","cluster_visualizer","(",")","visualizer.append_clusters","(","clusters",",","sample",")","visualizer.append_cluster","(","noise",",","sample",",","marker=","'","x","'",")","visualizer.show","(",")","@","endcode"]
docstr: !
  @brief Expands cluster from specified point in the input data space.
  
  @param[in] index_point (list): Index of a point from the data.
  
  @return (list) Return tuple of list of indexes that belong to the same cluster and list of points that are marked as noise: (cluster, noise), or None if nothing has been expanded.
docstr_tok: ["!","@","brief","Expands","cluster","from","specified","point","in","the","input","data","space",".","@","param","[","in","]","index_point","(","list",")",":","Index","of","a","point","from","the","data",".","@","return","(","list",")","Return","tuple","of","list","of","indexes","that","belong","to","the","same","cluster","and","list","of","points","that","are","marked","as","noise",":","(","cluster",",","noise",")",",","or","None","if","nothing","has","been","expanded","."]
code: def __expand_cluster(self, index_point):
      """!
      @brief Expands cluster from specified point in the input data space.
  
      @param[in] index_point (list): Index of a point from the data.
  
      @return (list) Return tuple of list of indexes that belong to the same cluster and list of points that are marked as noise: (cluster, noise), or None if nothing has been expanded.
  
      """
  
      cluster = None
      self.__visited[index_point] = True
      neighbors = self.__neighbor_searcher(index_point)
  
      if len(neighbors) >= self.__neighbors:
          cluster = [index_point]
  
          self.__belong[index_point] = True
  
          for i in neighbors:
              if self.__visited[i] is False:
                  self.__visited[i] = True
  
                  next_neighbors = self.__neighbor_searcher(i)
  
                  if len(next_neighbors) >= self.__neighbors:
                      neighbors += [
                          k
                          for k in next_neighbors
                          if ((k in neighbors) == False)
                          and k != index_point
                      ]
  
              if self.__belong[i] is False:
                  cluster.append(i)
                  self.__belong[i] = True
  
      return cluster
  
file_path: pyclustering/pyclustering/cluster/dbscan.py
imports: from pyclustering.container.kdtree import kdtree_balanced
  from pyclustering.cluster.encoder import type_encoding
  from pyclustering.core.wrapper import ccore_library
  import pyclustering.core.dbscan_wrapper
label_desc: Use image node_id 10 for calling the dbscan obj's underlying member method code with example usage: obj.__expand_cluster(index_point) and returns: cluster