T - Type of featurespublic class FeatureVectorCentroidsResult<T extends 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()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
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)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
String |
toString() |
void |
writeASCII(PrintWriter writer)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public T extends FeatureVector[] centroids
public FeatureVectorCentroidsResult()
public String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void readASCII(Scanner br) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIbr - source to read from.IOException - an error reading inputpublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic void writeASCII(PrintWriter writer) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIwriter - sink to write toIOException - an error writing to outpublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic T[] getCentroids()
getCentroids in interface CentroidsProvider<T extends FeatureVector>public HardAssigner<T,float[],IntFloatPair> defaultHardAssigner()
SpatialClustersdefaultHardAssigner in interface SpatialClusters<T extends FeatureVector>public int numDimensions()
SpatialClustersnumDimensions in interface SpatialClusters<T extends FeatureVector>public int numClusters()
SpatialClustersnumClusters in interface SpatialClusters<T extends FeatureVector>