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
ModifierConstructorDescriptionprotected
ClusterEnumerator
(chemaxon.clustering.libmcs.MGraph g, boolean leavesOnly) protected
ClusterEnumerator
(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 theMolecule
returned, and other fields generated by the clustering algorithm are added:RecoveryID
unique number of leaf nodes form left to right, starting from oneHierarchyID
hierarchical index of path from top to leafCluster.Member
unique cluster id . unique element id in the cluster
- Returns:
- next
Molecule
in the hierarchy
-