org.encog.ml.data.basic
Class BasicMLDataPairCentroid

java.lang.Object
  extended by org.encog.ml.data.basic.BasicMLDataPairCentroid
All Implemented Interfaces:
Cloneable, Centroid<MLDataPair>

public class BasicMLDataPairCentroid
extends Object
implements Centroid<MLDataPair>, Cloneable

A centroid for BasicMLDataPair.


Constructor Summary
BasicMLDataPairCentroid(BasicMLDataPair o)
          Construct the centroid.
 
Method Summary
 void add(MLDataPair d)
          Add an element to the centroid.
 double distance(MLDataPair d)
          The distance between this centroid and an element.
 void remove(MLDataPair d)
          Remove an element from the centroid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
remove in interface Centroid<MLDataPair>
Parameters:
d - The element to remove.

distance

public double distance(MLDataPair d)
The distance between this centroid and an element.

Specified by:
distance in interface Centroid<MLDataPair>
Parameters:
d - The element.
Returns:
The distance.

add

public void add(MLDataPair d)
Add an element to the centroid.

Specified by:
add in interface Centroid<MLDataPair>
Parameters:
d - The element to add.


Copyright © 2014. All Rights Reserved.