org.encog.ml.data.basic
Class BasicMLDataPairCentroid
- java.lang.Object
-
- org.encog.ml.data.basic.BasicMLDataPairCentroid
-
- All Implemented Interfaces:
- java.lang.Cloneable, Centroid<MLDataPair>
public class BasicMLDataPairCentroid extends java.lang.Object implements Centroid<MLDataPair>, java.lang.Cloneable
A centroid for BasicMLDataPair.
-
-
Constructor Summary
Constructors Constructor and Description BasicMLDataPairCentroid(BasicMLDataPair o)Construct the centroid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(MLDataPair d)Add an element to the centroid.doubledistance(MLDataPair d)The distance between this centroid and an element.voidremove(MLDataPair d)Remove an element from the centroid.
-
-
-
Constructor Detail
-
BasicMLDataPairCentroid
public BasicMLDataPairCentroid(BasicMLDataPair o)
Construct the centroid.- Parameters:
o- The pair to base the centroid on.
-
-
Method Detail
-
remove
public void remove(MLDataPair d)
Remove an element from the centroid.- Specified by:
removein interfaceCentroid<MLDataPair>- Parameters:
d- The element to remove.
-
distance
public double distance(MLDataPair d)
The distance between this centroid and an element.- Specified by:
distancein interfaceCentroid<MLDataPair>- Parameters:
d- The element.- Returns:
- The distance.
-
add
public void add(MLDataPair d)
Add an element to the centroid.- Specified by:
addin interfaceCentroid<MLDataPair>- Parameters:
d- The element to add.
-
-
DMelt 3.0 © DataMelt by jWork.ORG