public class Cluster
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
assignMember(double[] feat) |
int |
compareTo(java.lang.Object o) |
byte[] |
getByteRepresentation()
Creates a byte array representation from the clusters mean.
|
double |
getDistance(double[] f) |
double |
getDistance(FeatureVector f) |
double[] |
getMean()
Returns the cluster mean
|
int |
getSize() |
double |
getStress() |
void |
move() |
static Cluster[] |
readClusters(java.lang.String file) |
void |
reset() |
void |
setByteRepresentation(byte[] data) |
void |
setStress(double stress) |
java.lang.String |
toString() |
static void |
writeClusters(Cluster[] clusters,
java.lang.String path) |
public java.lang.String toString()
toString 在类中 java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo 在接口中 java.lang.Comparable<java.lang.Object>public double getDistance(FeatureVector f)
public double getDistance(double[] f)
public byte[] getByteRepresentation()
public void setByteRepresentation(byte[] data)
public double getStress()
public void setStress(double stress)
public int getSize()
public void reset()
public void assignMember(double[] feat)
public void move()
public double[] getMean()
public static void writeClusters(Cluster[] clusters, java.lang.String path) throws java.io.IOException
java.io.IOExceptionpublic static Cluster[] readClusters(java.lang.String file) throws java.io.IOException
java.io.IOException