Package elki.clustering.hierarchical
Class AbstractHDBSCAN.HDBSCANAdapter
- java.lang.Object
-
- elki.clustering.hierarchical.AbstractHDBSCAN.HDBSCANAdapter
-
- All Implemented Interfaces:
PrimsMinimumSpanningTree.Adapter<ArrayDBIDs>
- Enclosing class:
- AbstractHDBSCAN<O>
protected static class AbstractHDBSCAN.HDBSCANAdapter extends java.lang.Object implements PrimsMinimumSpanningTree.Adapter<ArrayDBIDs>
Class for processing the HDBSCAN G_mpts graph.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private DoubleDataStore
coredists
Core distance storage.private DistanceQuery<?>
distq
Distance query for exact distances.private ArrayDBIDs
ids
IDs to process.private DBIDArrayIter
p
Iterators for accessing the data objects.private DBIDArrayIter
q
Iterators for accessing the data objects.
-
Constructor Summary
Constructors Constructor Description HDBSCANAdapter(ArrayDBIDs ids, DoubleDataStore coredists, DistanceQuery<?> distq)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(ArrayDBIDs data, int ip, int iq)
Get the distance of two objectsint
size(ArrayDBIDs data)
Get number of objects in dataset
-
-
-
Field Detail
-
ids
private ArrayDBIDs ids
IDs to process.
-
q
private DBIDArrayIter q
Iterators for accessing the data objects.
-
p
private DBIDArrayIter p
Iterators for accessing the data objects.
-
coredists
private DoubleDataStore coredists
Core distance storage.
-
distq
private DistanceQuery<?> distq
Distance query for exact distances.
-
-
Constructor Detail
-
HDBSCANAdapter
public HDBSCANAdapter(ArrayDBIDs ids, DoubleDataStore coredists, DistanceQuery<?> distq)
Constructor.- Parameters:
ids
- Ids to process.coredists
- Core distancesdistq
- Distance query
-
-
Method Detail
-
distance
public double distance(ArrayDBIDs data, int ip, int iq)
Description copied from interface:PrimsMinimumSpanningTree.Adapter
Get the distance of two objects- Specified by:
distance
in interfacePrimsMinimumSpanningTree.Adapter<ArrayDBIDs>
- Parameters:
data
- Data setip
- First indexiq
- Second index- Returns:
- Distance of objects number i and number j.
-
size
public int size(ArrayDBIDs data)
Description copied from interface:PrimsMinimumSpanningTree.Adapter
Get number of objects in dataset- Specified by:
size
in interfacePrimsMinimumSpanningTree.Adapter<ArrayDBIDs>
- Returns:
- Size
-
-