be.ac.ulg.montefiore.run.jahmm
Class CentroidObservationReal

java.lang.Object
  extended by be.ac.ulg.montefiore.run.jahmm.CentroidObservationReal
All Implemented Interfaces:
Centroid<ObservationReal>

public class CentroidObservationReal
extends java.lang.Object
implements Centroid<ObservationReal>

This class represents the centroid of a set of ObservationReal.


Constructor Summary
CentroidObservationReal(ObservationReal o)
           
 
Method Summary
 double distance(ObservationReal e)
          Returns the distance from this centroid to a given element.
 void reevaluateAdd(ObservationReal e, java.util.List<? extends ObservationReal> v)
          Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we want it to be the centroid of v plus the value of the observation e.
 void reevaluateRemove(ObservationReal e, java.util.List<? extends ObservationReal> v)
          Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we want it to be the centroid of v minus the value of the observation e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentroidObservationReal

public CentroidObservationReal(ObservationReal o)
Method Detail

reevaluateAdd

public void reevaluateAdd(ObservationReal e,
                          java.util.List<? extends ObservationReal> v)
Description copied from interface: Centroid
Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we want it to be the centroid of v plus the value of the observation e.

Specified by:
reevaluateAdd in interface Centroid<ObservationReal>
Parameters:
e - An observation that must be involved in the computation of the new value of this centroid.
v - The set of observations that gave the current value of this centroid.

reevaluateRemove

public void reevaluateRemove(ObservationReal e,
                             java.util.List<? extends ObservationReal> v)
Description copied from interface: Centroid
Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we want it to be the centroid of v minus the value of the observation e.

Specified by:
reevaluateRemove in interface Centroid<ObservationReal>
Parameters:
e - An observation that must not be involved in the computation of the new value of this centroid.
v - The set of observations (which holds o) that gave the current value of this centroid.

distance

public double distance(ObservationReal e)
Returns the distance from this centroid to a given element. This distance is the absolute value of the difference between the value of this centroid and the value of the argument.

Specified by:
distance in interface Centroid<ObservationReal>
Parameters:
e - The element, which must be an ObservationReal.
Returns:
The distance to the centroid.


Copyright © 2004,2005 Jean-Marc François.