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 class
ParallelGeneralizedDBSCAN.Instance.Mapper
Instance 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[]
borders
Border objects (shared)private WritableDataStore<Assignment>
clusterids
Cluster assignment storage.protected boolean
coremodel
Track which objects are "core" objects.protected CorePredicate.Instance<? super T>
corepred
The core object propertyprivate Core[]
cores
Core objects (shared)private Database
database
Database for cloning neighbor predicates.private int
nextclus
Next cluster number assigned.protected NeighborPredicate.Instance<T>
npred
The neighborhood predicateprivate NeighborPredicate<? extends T>
npreds
Factory for neighbor predicates.private FiniteProgress
progress
Progress 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 void
cleanup(Processor.Instance inst)
Invoke cleanup.ParallelGeneralizedDBSCAN.Instance.Mapper
instantiate(Executor executor)
Create an instance.protected void
processNeighbors(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:Processor
Create an instance. May be called multiple times, for example for multiple threads.- Specified by:
instantiate
in interfaceProcessor
- Parameters:
executor
- Job executor- Returns:
- Instance
-
cleanup
public void cleanup(Processor.Instance inst)
Description copied from interface:Processor
Invoke cleanup.
-
-