@Beta @PublicAPI public class IDBasedAssignerBuilder extends Object
Checking of the above conditions are not enforced during setup.
Please note that this class is marked with Beta
annotation, so it can be subject of incompatible changes
or removal in later releases.
Constructor and Description |
---|
IDBasedAssignerBuilder() |
Modifier and Type | Method and Description |
---|---|
double |
getClusterLevel(int clusterID)
Get the current associated level for a cluster.
|
double |
getLeafLevel(int leafID)
Get the current associated level for a leaf.
|
boolean |
isEmpty()
Check if no level info set.
|
void |
setClusterLevel(int clusterID,
double level)
Set the level of a specific cluster.
|
void |
setLeafLevel(int leafID,
double level)
Set the level of a specific leaf node.
|
public boolean isEmpty()
false
when at least one setClusterLevel(int, double)
or
setLeafLevel(int, double)
invocation occured.public void setClusterLevel(int clusterID, double level)
If level information for a specific cluster is already set it will be overwritten. Note that 0
level must be explicitly set for roots when clustering is root aligned.
clusterID
- ID of clusterlevel
- Level to assignpublic double getClusterLevel(int clusterID)
clusterID
- ID of a clusterIllegalArgumentException
- when no level set for the given clusterpublic double getLeafLevel(int leafID)
leafID
- ID of a leafIllegalArgumentException
- when no level set for the given leafpublic void setLeafLevel(int leafID, double level)
If level information for a specific leaf is already set it will be overwritten. Note that explicitly setting
0
level of leaves for leaf aligned clusterings is not needed. Mixed setting is also possible.
leafID
- ID of the leaflevel
- Level to assign