Package elki.clustering.dbscan.parallel
Class ParallelGeneralizedDBSCAN.Instance<T>
- java.lang.Object
-
- elki.clustering.dbscan.parallel.ParallelGeneralizedDBSCAN.Instance<T>
-
- All Implemented Interfaces:
Processor
- Enclosing class:
- ParallelGeneralizedDBSCAN
public static class ParallelGeneralizedDBSCAN.Instance<T> extends java.lang.Object implements Processor
Instance for a particular data set.- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classParallelGeneralizedDBSCAN.Instance.MapperInstance to process part of the data set, for a single iteration.-
Nested classes/interfaces inherited from interface elki.parallel.processor.Processor
Processor.Instance
-
-
Field Summary
Fields Modifier and Type Field Description private Border[]bordersBorder objects (shared)private WritableDataStore<Assignment>clusteridsCluster assignment storage.protected booleancoremodelTrack which objects are "core" objects.protected CorePredicate.Instance<? super T>corepredThe core object propertyprivate Core[]coresCore objects (shared)private DatabasedatabaseDatabase for cloning neighbor predicates.private intnextclusNext cluster number assigned.protected NeighborPredicate.Instance<T>npredThe neighborhood predicateprivate NeighborPredicate<? extends T>npredsFactory for neighbor predicates.private FiniteProgressprogressProgress logger.
-
Constructor Summary
Constructors Constructor Description Instance(Database database, NeighborPredicate<T> npreds, CorePredicate<? super T> corepred, boolean coremodel)Full Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup(Processor.Instance inst)Invoke cleanup.ParallelGeneralizedDBSCAN.Instance.Mapperinstantiate(Executor executor)Create an instance.protected voidprocessNeighbors(DBIDRef id, T neighbors)Synchronize function to process the neighbors.Clustering<Model>run()Run the parallel GDBSCAN algorithm.
-
-
-
Field Detail
-
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.
-
clusterids
private WritableDataStore<Assignment> clusterids
Cluster assignment storage.
-
cores
private Core[] cores
Core objects (shared)
-
borders
private Border[] borders
Border objects (shared)
-
nextclus
private int nextclus
Next cluster number assigned.
-
database
private Database database
Database for cloning neighbor predicates.
-
npreds
private NeighborPredicate<? extends T> npreds
Factory for neighbor predicates.
-
progress
private FiniteProgress progress
Progress logger.
-
-
Constructor Detail
-
Instance
public Instance(Database database, NeighborPredicate<T> npreds, CorePredicate<? super T> corepred, boolean coremodel)
Full Constructor- Parameters:
database- Database to processnpreds- Neighborhood predicatecorepred- Core object predicatecoremodel- Keep track of core points.
-
-
Method Detail
-
run
public Clustering<Model> run()
Run the parallel GDBSCAN algorithm.- Returns:
- Clustering result
-
processNeighbors
protected void processNeighbors(DBIDRef id, T neighbors)
Synchronize function to process the neighbors.- Parameters:
id- Current pointneighbors- Neighbors
-
instantiate
public ParallelGeneralizedDBSCAN.Instance.Mapper instantiate(Executor executor)
Description copied from interface:ProcessorCreate an instance. May be called multiple times, for example for multiple threads.- Specified by:
instantiatein interfaceProcessor- Parameters:
executor- Job executor- Returns:
- Instance
-
cleanup
public void cleanup(Processor.Instance inst)
Description copied from interface:ProcessorInvoke cleanup.
-
-