DATATYPE - the primitive array datatype which represents a centroid of this
cluster.DISTANCES - primitive array datatype for recording distances between points
and cluster centroids.public interface SoftAssigner<DATATYPE,DISTANCES> extends Assigner<DATATYPE>
SoftAssigner interface describes classes that assign a spatial
point to multiple clusters, possibly with weighting.| Modifier and Type | Method and Description |
|---|---|
int[] |
assign(DATATYPE data)
Assign a single point to some clusters.
|
int[][] |
assign(DATATYPE[] data)
Assign data to clusters.
|
IndependentPair<int[],DISTANCES> |
assignWeighted(DATATYPE data)
Assign a single point to some clusters.
|
void |
assignWeighted(DATATYPE[] data,
int[][] assignments,
DISTANCES[] weights)
Assign data to clusters.
|
int |
size()
The number of clusters.
|
numDimensionsint[][] assign(DATATYPE[] data)
data - the data.int[] assign(DATATYPE data)
data - datum to assign.void assignWeighted(DATATYPE[] data, int[][] assignments, DISTANCES[] weights)
data - the data.assignments - the cluster indices for each data point.weights - the weights to the for each cluster for each data point.IndependentPair<int[],DISTANCES> assignWeighted(DATATYPE data)
data - point to assign.int size()