Package chemaxon.clustering.libmcs
Class LibraryMcs.ClusterEnumerator
java.lang.Object
chemaxon.clustering.libmcs.LibraryMcs.ClusterEnumerator
- Enclosing class:
LibraryMcs
The
Note, that clients are not supposed to instantiate this class directly, instead, the two corresponsing method of the
ClusterEnumerator is the right way to obtain results of a LibraryMCS clustering.
When clustering terminates, an instance of this class can be retrieved from the LibraryMCS class by
the LibraryMcs.getClusterEnumerator(boolean) method. The enumerator then
returns each cluster one-by-one starting from the top level of the hierarchy and traversing the dendogram level
by level.
Note, that clients are not supposed to instantiate this class directly, instead, the two corresponsing method of the
LibraryMCS class have to be applied (see LibraryMcs.getClusterEnumerator(boolean),
LibraryMcs.getClusterEnumerator(boolean)).-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClusterEnumerator(chemaxon.clustering.libmcs.MGraph g, boolean leavesOnly) protectedClusterEnumerator(chemaxon.clustering.libmcs.MGraph g, boolean leavesOnly, boolean selectedOnly) -
Method Summary
-
Constructor Details
-
ClusterEnumerator
protected ClusterEnumerator(chemaxon.clustering.libmcs.MGraph g, boolean leavesOnly) -
ClusterEnumerator
protected ClusterEnumerator(chemaxon.clustering.libmcs.MGraph g, boolean leavesOnly, boolean selectedOnly)
-
-
Method Details
-
hasNext
public boolean hasNext()Checks if there is at least one more element in the cluster hierachy that has not yet been listed.- Returns:
- true if there are more elements
-
next
Returns the next element in the cluster hierarchy that has not yet been processed. Levels are enumerated top-down manner and one level is enumerated from left to right. All (optional) input fields are stored along with theMoleculereturned, and other fields generated by the clustering algorithm are added:RecoveryIDunique number of leaf nodes form left to right, starting from oneHierarchyIDhierarchical index of path from top to leafCluster.Memberunique cluster id . unique element id in the cluster
- Returns:
- next
Moleculein the hierarchy
-