Class GeneralizedDBSCAN.Instance<T>

  • Enclosing class:
    GeneralizedDBSCAN

    public static class GeneralizedDBSCAN.Instance<T>
    extends java.lang.Object
    Instance for a particular data set.
    Author:
    Erich Schubert
    • Constructor Detail

      • Instance

        public Instance​(NeighborPredicate.Instance<T> npred,
                        CorePredicate.Instance<? super T> corepred,
                        boolean coremodel)
        Full Constructor
        Parameters:
        npred - Neighborhood predicate
        corepred - Core object predicate
        coremodel - Keep track of core points.
    • Method Detail

      • run

        public Clustering<Model> run()
        Run the actual GDBSCAN algorithm.
        Returns:
        Clustering result
      • expandCluster

        protected int expandCluster​(DBIDRef seed,
                                    int clusterid,
                                    WritableIntegerDataStore clusterids,
                                    T neighbors,
                                    ArrayModifiableDBIDs activeSet,
                                    FiniteProgress progress)
        Set-based expand cluster implementation.
        Parameters:
        clusterid - ID of the current cluster.
        clusterids - Current object to cluster mapping.
        neighbors - Neighbors acquired by initial getNeighbors call.
        activeSet - Set to manage active candidates.
        progress - Progress logging
        Returns:
        cluster size
      • processCorePoint

        protected int processCorePoint​(DBIDRef seed,
                                       T newneighbors,
                                       int clusterid,
                                       WritableIntegerDataStore clusterids,
                                       ArrayModifiableDBIDs activeSet)
        Process a single core point.
        Parameters:
        seed - Point to process
        newneighbors - New neighbors
        clusterid - Cluster to add to
        clusterids - Cluster assignment storage.
        activeSet - Active set of cluster seeds
        Returns:
        Number of new points added to cluster