Package elki.clustering.hierarchical
Class LinearMemoryNNChain.Instance<O extends NumberVector>
- java.lang.Object
-
- elki.clustering.hierarchical.LinearMemoryNNChain.Instance<O>
-
- Type Parameters:
O
- vector type
- Enclosing class:
- LinearMemoryNNChain<O extends NumberVector>
public static class LinearMemoryNNChain.Instance<O extends NumberVector> extends java.lang.Object
Main worker instance of NNChain.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private GeometricLinkage
linkage
Linkage method.
-
Constructor Summary
Constructors Constructor Description Instance(GeometricLinkage linkage)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
merge(int end, double[][] clusters, ClusterMergeHistoryBuilder builder, int[] clustermap, double mindist, int x, int y)
Execute the cluster merge.private void
nnChainCore(DBIDArrayIter aIt, DBIDArrayIter aIt2, ClusterMergeHistoryBuilder builder, Relation<O> rel)
Core function of NNChain.ClusterMergeHistory
run(ArrayDBIDs ids, Relation<O> relation, ClusterMergeHistoryBuilder builder)
-
-
-
Field Detail
-
linkage
private GeometricLinkage linkage
Linkage method.
-
-
Constructor Detail
-
Instance
public Instance(GeometricLinkage linkage)
Constructor.- Parameters:
linkage
- Linkage
-
-
Method Detail
-
run
public ClusterMergeHistory run(ArrayDBIDs ids, Relation<O> relation, ClusterMergeHistoryBuilder builder)
-
nnChainCore
private void nnChainCore(DBIDArrayIter aIt, DBIDArrayIter aIt2, ClusterMergeHistoryBuilder builder, Relation<O> rel)
Core function of NNChain.- Parameters:
aIt
- Iterator to access relation objectsaIt2
- Iterator to access relation objectsbuilder
- Result builder
-
merge
protected void merge(int end, double[][] clusters, ClusterMergeHistoryBuilder builder, int[] clustermap, double mindist, int x, int y)
Execute the cluster merge.- Parameters:
end
- Active set sizeclusters
- Array of cluster centersbuilder
- Hierarchy builderclustermap
- Cluster assignmentmindist
- Distance that was used for mergingx
- First matrix positiony
- Second matrix position
-
-