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 Performs cluster analysis in line with rules of DBSCAN algorithm.
  
  @return (dbscan) Returns itself (DBSCAN instance).
  
  @see get_clusters()
  @see get_noise()
docstr_tok: ["!","@","brief","Performs","cluster","analysis","in","line","with","rules","of","DBSCAN","algorithm",".","@","return","(","dbscan",")","Returns","itself","(","DBSCAN","instance",")",".","@","see","get_clusters","(",")","@","see","get_noise","(",")"]
code: def process(self):
      """!
      @brief Performs cluster analysis in line with rules of DBSCAN algorithm.
  
      @return (dbscan) Returns itself (DBSCAN instance).
  
      @see get_clusters()
      @see get_noise()
  
      """
  
      if self.__ccore is True:
          (self.__clusters, self.__noise) = wrapper.dbscan(
              self.__pointer_data,
              self.__eps,
              self.__neighbors,
              self.__data_type,
          )
  
      else:
          if self.__data_type == "points":
              self.__kdtree = kdtree_balanced(
                  self.__pointer_data, range(len(self.__pointer_data))
              )
  
          self.__visited = [False] * len(self.__pointer_data)
          self.__belong = [False] * len(self.__pointer_data)
  
          self.__neighbor_searcher = self.__create_neighbor_searcher(
              self.__data_type
          )
  
          for i in range(0, len(self.__pointer_data)):
              if self.__visited[i] is False:
                  cluster = self.__expand_cluster(i)
                  if cluster is not None:
                      self.__clusters.append(cluster)
  
          for i in range(0, len(self.__pointer_data)):
              if self.__belong[i] is False:
                  self.__noise.append(i)
  
      return self
  
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 4 for calling the dbscan obj's underlying member method code with example usage: obj.process() and returns: self