ostore.introspect
Class SemanticDistanceModel.Delta

java.lang.Object
  |
  +--ostore.introspect.SemanticDistanceModel.Delta
All Implemented Interfaces:
Model.Delta, QueueElementIF, QuickSerializable
Enclosing class:
SemanticDistanceModel

public static class SemanticDistanceModel.Delta
extends Object
implements Model.Delta

Implements Model.Delta for this model type.

Version:
$Id: SemanticDistanceModel.java,v 1.11 2003/11/17 23:52:43 emilong Exp $
Author:
Jeff Pang

Constructor Summary
SemanticDistanceModel.Delta(InputBuffer buffer)
           
SemanticDistanceModel.Delta(QSVector obs, SemanticDistanceModel.Filter filter, SemanticDistanceModel.Table base)
           
 
Method Summary
 SemanticDistanceModel.Filter getFilter()
          Get the filter used for this delta's computations
 SemanticDistanceModel.Table getTable()
          Get the table of distance values in this delta
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 void setFilter(SemanticDistanceModel.Filter filter)
          Set the filter used for this delta's computations
 Model.Delta sum(Model.Delta other)
          Produce the sum of this and another Delta.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemanticDistanceModel.Delta

public SemanticDistanceModel.Delta(QSVector obs,
                                   SemanticDistanceModel.Filter filter,
                                   SemanticDistanceModel.Table base)
Parameters:
obs - new observations to include in this delta. This should be a List<QSPair<QuickSerializable event, Time t>> sorted by time in ascending order.
filter - the filter to use to recalculate distances.
base - the base table that we started with (we extract the previous access times from this table)

SemanticDistanceModel.Delta

public SemanticDistanceModel.Delta(InputBuffer buffer)
                            throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

sum

public Model.Delta sum(Model.Delta other)
Description copied from interface: Model.Delta
Produce the sum of this and another Delta.

Specified by:
sum in interface Model.Delta
Parameters:
other - The other Delta.
Returns:
a new Delta, constructed such that applying it to a Model produces an equivalent Model to that produced by adding first this, then other.

getFilter

public SemanticDistanceModel.Filter getFilter()
Get the filter used for this delta's computations


setFilter

public void setFilter(SemanticDistanceModel.Filter filter)
Set the filter used for this delta's computations


getTable

public SemanticDistanceModel.Table getTable()
Get the table of distance values in this delta


toString

public String toString()
Overrides:
toString in class Object