public class IntCentroidsResult extends Object implements SpatialClusters<int[]>, CentroidsProvider<int[]>
SpatialClusterer that just produces a flat set of centroids.| Modifier and Type | Field and Description |
|---|---|
int[][] |
centroids
The centroids of the clusters
|
CLUSTER_HEADER| Constructor and Description |
|---|
IntCentroidsResult() |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
HardAssigner<int[],float[],IntFloatPair> |
defaultHardAssigner()
Get the default hard assigner for this clusterer.
|
boolean |
equals(Object obj) |
int[][] |
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 int[][] centroids
public IntCentroidsResult()
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 int[][] getCentroids()
getCentroids in interface CentroidsProvider<int[]>public HardAssigner<int[],float[],IntFloatPair> defaultHardAssigner()
SpatialClustersdefaultHardAssigner in interface SpatialClusters<int[]>public int numDimensions()
SpatialClustersnumDimensions in interface SpatialClusters<int[]>public int numClusters()
SpatialClustersnumClusters in interface SpatialClusters<int[]>