public class KDTreeClusters extends IndexClusters implements SpatialClusters<double[]>
clusters, nEntriesCLUSTER_HEADER| Constructor and Description |
|---|
KDTreeClusters(DoubleKDTree tree,
int dims) |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
HardAssigner<double[],?,?> |
defaultHardAssigner()
Get the default hard assigner for this clusterer.
|
int |
numClusters()
Get the number of clusters.
|
int |
numDimensions()
Get the data dimensionality
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
clusters, numEntries, toStringpublic KDTreeClusters(DoubleKDTree tree, int dims)
tree - the KDTree which represents the clustersdims - public int numDimensions()
SpatialClustersnumDimensions in interface SpatialClusters<double[]>public int numClusters()
IndexClustersnumClusters in interface SpatialClusters<double[]>numClusters in class IndexClusterspublic HardAssigner<double[],?,?> defaultHardAssigner()
SpatialClustersdefaultHardAssigner in interface SpatialClusters<double[]>public void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIreadASCII in class IndexClustersin - source to read from.IOException - an error reading inputpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIasciiHeader in class IndexClusterspublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryreadBinary in class IndexClustersin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarybinaryHeader in class IndexClusterspublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIwriteASCII in class IndexClustersout - sink to write toIOException - an error writing to outpublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinarywriteBinary in class IndexClustersout - sink to write toIOException - an error writing to out