Package elki.data.synthetic.bymodel
Class GeneratorMain.AssignLabelsByDensity
- java.lang.Object
-
- elki.data.synthetic.bymodel.GeneratorMain.AssignLabelsByDensity
-
- Enclosing class:
- GeneratorMain
private class GeneratorMain.AssignLabelsByDensity extends java.lang.Object
Reassign objects in certain labels; but also always test against the model.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private GeneratorInterface
curclus
Current cluster generator.private ClassLabel[]
labels
Cluster labels.
-
Constructor Summary
Constructors Constructor Description AssignLabelsByDensity(ClassLabel[] labels)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAssignment(int i, double[] p)
Assign a point to a cluster.void
newCluster(int i, GeneratorInterface curclus)
Set the current cluster.
-
-
-
Field Detail
-
labels
private ClassLabel[] labels
Cluster labels.
-
curclus
private GeneratorInterface curclus
Current cluster generator.
-
-
Constructor Detail
-
AssignLabelsByDensity
public AssignLabelsByDensity(ClassLabel[] labels)
Constructor.- Parameters:
labels
- Cluster labels
-
-
Method Detail
-
newCluster
public void newCluster(int i, GeneratorInterface curclus)
Description copied from class:GeneratorMain.AssignPoint
Set the current cluster.- Overrides:
newCluster
in classGeneratorMain.AssignPoint
- Parameters:
i
- Current cluster.curclus
- Generator
-
getAssignment
public int getAssignment(int i, double[] p)
Description copied from class:GeneratorMain.AssignPoint
Assign a point to a cluster.- Overrides:
getAssignment
in classGeneratorMain.AssignPoint
- Parameters:
i
- Cluster numberp
- Point- Returns:
- New cluster number.
-
-