Package com.chemaxon.clustering.common
Interface IDBasedClusterBuilderSpec
Allowing fluent API calls to
IDBasedHierarchicClusterBuilder.-
Method Summary
Modifier and TypeMethodDescriptionaddChildCluster(int childClusterId) Add child cluster.addImmediateLeaf(int leafId) Add a leaf to this cluster.addImmediateLeafWithLevel(int leafId, double level) Add a leaf to this cluster.addImmediateLeaves(Integer... leafIds) Add multiple leaves to the represented cluster.build()Build represented hierarchy.Add a child cluster.Add a new root cluster.Add a child cluster to the same parent.parent()Refers to the parent cluster if present.setLevel(double level) Set level.setRepresentant(int memberId) Set representant.
-
Method Details
-
addImmediateLeaf
Add a leaf to this cluster.Delegates to
IDBasedHierarchicClusterBuilder.addStructureToCluster(int, int).- Parameters:
leafId- Leaf ID- Returns:
- Reference to
thisinstance
-
addImmediateLeafWithLevel
Add a leaf to this cluster.Delegates to
IDBasedHierarchicClusterBuilder.addStructureToCluster(int, int)andIDBasedHierarchicClusterBuilder.setLeafPreferredLevel(int, double).- Parameters:
leafId- Leaf IDlevel- Leaf level- Returns:
- Reference to
thisinstance
-
addImmediateLeaves
Add multiple leaves to the represented cluster.Delegates to
IDBasedHierarchicClusterBuilder.addStructureToCluster(int, int).- Parameters:
leafIds- IDs of the leaves- Returns:
- Reference to
thisinstance
-
setRepresentant
Set representant.Delegates to
IDBasedHierarchicClusterBuilder.setClusterRepresentant(int, int).- Parameters:
memberId- Representant member ID- Returns:
- Reference to
thisinstance
-
setLevel
Set level.Delegates to
IDBasedHierarchicClusterBuilder.setClusterPreferredLevel(int, double).- Parameters:
level- Cluster level- Returns:
- Reference to
thisinstance
-
addChildCluster
Add child cluster.This method returns with a reference associated to the newly added child cluster!. Delegates to
IDBasedHierarchicClusterBuilder.addChildCluster(int, int).- Parameters:
childClusterId- Child cluster ID- Returns:
- reference to the child cluster spec
-
newChildCluster
IDBasedClusterBuilderSpec newChildCluster()Add a child cluster.- Returns:
- reference to the child cluster spec
-
newSiblingCluster
IDBasedClusterBuilderSpec newSiblingCluster()Add a child cluster to the same parent.- Returns:
- reference to the child cluster spec
- Throws:
IllegalStateException- when the representant cluster has no parent
-
parent
IDBasedClusterBuilderSpec parent()Refers to the parent cluster if present.- Returns:
- Reference to the parent cluster spec
- Throws:
IllegalStateException- when no parent cluster is set
-
newRootCluster
IDBasedClusterBuilderSpec newRootCluster()Add a new root cluster.Delegates to
IDBasedHierarchicClusterBuilder.newCluster().- Returns:
- reference to the new cluster spec
-
build
IDBasedHierarchicClustering build()Build represented hierarchy.Delegates to
IDBasedHierarchicClusterBuilder.build()- Returns:
- built hierarchy
-