public class HardAssignment extends Object implements Assignment
Assignment where a data point may be assigned
to at most one cluster, i.e. a hard assignment policy.| Constructor and Description |
|---|
HardAssignment()
Creates a new
HardAssignment the data point is not assigned to
any cluster. |
HardAssignment(int assignment)
Creates a new
HardAssignment where the data point is assigned to
the specified cluster value. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
assignments()
Returns the cluster id's that a specific data point was assigned to.
|
int |
length()
Returns the number of assignments given for this data point.
|
public HardAssignment()
HardAssignment the data point is not assigned to
any cluster.public HardAssignment(int assignment)
HardAssignment where the data point is assigned to
the specified cluster value.public int[] assignments()
assignments in interface Assignmentpublic int length()
length in interface AssignmentCopyright © 2012. All Rights Reserved.