org.neuroph.nnet.learning.kmeans
Class KVector
- java.lang.Object
-
- org.neuroph.nnet.learning.kmeans.KVector
-
public class KVector extends java.lang.ObjectRepresents feature vector used in k-means clustering algorithm
-
-
Constructor Summary
Constructors Constructor and Description KVector(double[] values)KVector(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubledistanceFrom(KVector otherVector)Calculates and returns euclidean distance of this vector from the given clusterClustergetCluster()doublegetDistance()doublegetIntensity()Calculates and returns intensity of this vectordoublegetValueAt(int idx)double[]getValues()voidsetCluster(Cluster cluster)voidsetDistance(double distance)voidsetValueAt(int idx, double value)voidsetValues(double[] values)intsize()java.lang.StringtoString()
-
-
-
Method Detail
-
setValueAt
public void setValueAt(int idx, double value)
-
getValueAt
public double getValueAt(int idx)
-
getValues
public double[] getValues()
-
setValues
public void setValues(double[] values)
-
getCluster
public Cluster getCluster()
-
setCluster
public void setCluster(Cluster cluster)
-
getIntensity
public double getIntensity()
Calculates and returns intensity of this vector- Returns:
- intensity of this vector
-
distanceFrom
public double distanceFrom(KVector otherVector)
Calculates and returns euclidean distance of this vector from the given cluster- Parameters:
cluster-- Returns:
- euclidean distance of this vector from given cluster
-
size
public int size()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDistance
public double getDistance()
-
setDistance
public void setDistance(double distance)
-
-
DMelt 3.0 © DataMelt by jWork.ORG