T - Type of featurespublic class FeatureVectorCentroidsResult<T extends org.openimaj.feature.FeatureVector> extends Object implements SpatialClusters<T>, CentroidsProvider<T>
SpatialClusterer that just produces a flat set of
centroids in the form of FeatureVectors.| Modifier and Type | Field and Description |
|---|---|
T[] |
centroids
The centroids of the clusters
|
CLUSTER_HEADER| Constructor and Description |
|---|
FeatureVectorCentroidsResult() |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader() |
byte[] |
binaryHeader() |
HardAssigner<T,float[],IntFloatPair> |
defaultHardAssigner()
Get the default hard assigner for this clusterer.
|
boolean |
equals(Object obj) |
T[] |
getCentroids() |
int |
numClusters()
Get the number of clusters.
|
int |
numDimensions()
Get the data dimensionality
|
void |
readASCII(Scanner br) |
void |
readBinary(DataInput in) |
String |
toString() |
void |
writeASCII(PrintWriter writer) |
void |
writeBinary(DataOutput out) |
public T extends org.openimaj.feature.FeatureVector[] centroids
public FeatureVectorCentroidsResult()
public String asciiHeader()
asciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic byte[] binaryHeader()
binaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void readASCII(Scanner br) throws IOException
readASCII in interface ReadableASCIIIOExceptionpublic void readBinary(DataInput in) throws IOException
readBinary in interface ReadableBinaryIOExceptionpublic void writeASCII(PrintWriter writer) throws IOException
writeASCII in interface WriteableASCIIIOExceptionpublic void writeBinary(DataOutput out) throws IOException
writeBinary in interface WriteableBinaryIOExceptionpublic T[] getCentroids()
getCentroids in interface CentroidsProvider<T extends org.openimaj.feature.FeatureVector>public HardAssigner<T,float[],IntFloatPair> defaultHardAssigner()
SpatialClustersdefaultHardAssigner in interface SpatialClusters<T extends org.openimaj.feature.FeatureVector>public int numDimensions()
SpatialClustersnumDimensions in interface SpatialClusters<T extends org.openimaj.feature.FeatureVector>public int numClusters()
SpatialClustersnumClusters in interface SpatialClusters<T extends org.openimaj.feature.FeatureVector>