Package elki.clustering.dbscan
Class GeneralizedDBSCAN.Instance<T>
- java.lang.Object
-
- elki.clustering.dbscan.GeneralizedDBSCAN.Instance<T>
-
- Enclosing class:
- GeneralizedDBSCAN
public static class GeneralizedDBSCAN.Instance<T> extends java.lang.ObjectInstance for a particular data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancoremodelTrack which objects are "core" objects.protected CorePredicate.Instance<? super T>corepredThe core object propertyprotected static intNOISENoise IDsprotected NeighborPredicate.Instance<T>npredThe neighborhood predicateprotected static intUNPROCESSEDUnprocessed IDs
-
Constructor Summary
Constructors Constructor Description Instance(NeighborPredicate.Instance<T> npred, CorePredicate.Instance<? super T> corepred, boolean coremodel)Full Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intexpandCluster(DBIDRef seed, int clusterid, WritableIntegerDataStore clusterids, T neighbors, ArrayModifiableDBIDs activeSet, FiniteProgress progress)Set-based expand cluster implementation.protected intprocessCorePoint(DBIDRef seed, T newneighbors, int clusterid, WritableIntegerDataStore clusterids, ArrayModifiableDBIDs activeSet)Process a single core point.Clustering<Model>run()Run the actual GDBSCAN algorithm.
-
-
-
Field Detail
-
UNPROCESSED
protected static final int UNPROCESSED
Unprocessed IDs- See Also:
- Constant Field Values
-
NOISE
protected static final int NOISE
Noise IDs- See Also:
- Constant Field Values
-
npred
protected final NeighborPredicate.Instance<T> npred
The neighborhood predicate
-
corepred
protected final CorePredicate.Instance<? super T> corepred
The core object property
-
coremodel
protected boolean coremodel
Track which objects are "core" objects.
-
-
Constructor Detail
-
Instance
public Instance(NeighborPredicate.Instance<T> npred, CorePredicate.Instance<? super T> corepred, boolean coremodel)
Full Constructor- Parameters:
npred- Neighborhood predicatecorepred- Core object predicatecoremodel- 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 processnewneighbors- New neighborsclusterid- Cluster to add toclusterids- Cluster assignment storage.activeSet- Active set of cluster seeds- Returns:
- Number of new points added to cluster
-
-