de.aitools.dm.clustering.dendrogram
Class DendrogramMergeIterator<M extends Merge>
java.lang.Object
de.aitools.dm.clustering.dendrogram.DendrogramMergeIterator<M>
- All Implemented Interfaces:
- DendrogramIterator<M>, java.util.Iterator<DendrogramIterator<M>>
public final class DendrogramMergeIterator<M extends Merge>
- extends java.lang.Object
- implements DendrogramIterator<M>
A DendrogramIterator
for Merge
ClusterStep
s.
- Version:
- $Id: DendrogramMergeIterator.java,v 1.1 2011/06/22 14:22:51 dogu3912 Exp $
- Author:
- johannes.kiesel(/\t)uni-weimar.de
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DendrogramMergeIterator
public DendrogramMergeIterator(int numPoints,
java.util.List<M> mergeList)
- Create the iterator.
- Parameters:
numPoints
- Number of points that were clustered.mergeList
- The list of merges. The indices of the
merged clusters must indices of a point of the cluster in the
clustered array.
getCurrentAssignments
public int[] getCurrentAssignments()
- Description copied from interface:
DendrogramIterator
- Get the cluster assignment of all points of the input data (data)
at the current step
- Specified by:
getCurrentAssignments
in interface DendrogramIterator<M extends Merge>
- Returns:
- Cluster assignment c such that
c[i] = cluster-id of the cluster to which data[i]
was assigned.
getLastChange
public M getLastChange()
- Specified by:
getLastChange
in interface DendrogramIterator<M extends Merge>
- Returns:
- The last
ClusterStep
before the current state of
cluster assignment.
getNextChange
public M getNextChange()
- Specified by:
getNextChange
in interface DendrogramIterator<M extends Merge>
- Returns:
- The
ClusterStep
that will lead to the next state of
cluster assignment.
getNumClusters
public int getNumClusters()
- Specified by:
getNumClusters
in interface DendrogramIterator<M extends Merge>
- Returns:
- Current number of clusters.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<DendrogramIterator<M extends Merge>>
next
public DendrogramMergeIterator<M> next()
- Specified by:
next
in interface java.util.Iterator<DendrogramIterator<M extends Merge>>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<DendrogramIterator<M extends Merge>>