public class ByteCentroidsResult extends Object implements SpatialClusters<byte[]>, CentroidsProvider<byte[]>
SpatialClusterer
that just produces a flat set of centroids.Modifier and Type | Field and Description |
---|---|
byte[][] |
centroids
The centroids of the clusters
|
CLUSTER_HEADER
Constructor and Description |
---|
ByteCentroidsResult() |
Modifier and Type | Method and Description |
---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
HardAssigner<byte[],float[],IntFloatPair> |
defaultHardAssigner()
Get the default hard assigner for this clusterer.
|
boolean |
equals(Object obj) |
byte[][] |
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 byte[][] centroids
public ByteCentroidsResult()
public String asciiHeader()
ReadableASCII
asciiHeader
in interface ReadableASCII
asciiHeader
in interface WriteableASCII
public byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public void readASCII(Scanner br) throws IOException
ReadableASCII
readASCII
in interface ReadableASCII
br
- source to read from.IOException
- an error reading inputpublic void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic void writeASCII(PrintWriter writer) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
writer
- sink to write toIOException
- an error writing to outpublic void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic byte[][] getCentroids()
getCentroids
in interface CentroidsProvider<byte[]>
public HardAssigner<byte[],float[],IntFloatPair> defaultHardAssigner()
SpatialClusters
defaultHardAssigner
in interface SpatialClusters<byte[]>
public int numDimensions()
SpatialClusters
numDimensions
in interface SpatialClusters<byte[]>
public int numClusters()
SpatialClusters
numClusters
in interface SpatialClusters<byte[]>