Mobios v0.91

mobios.dist
Class MSMSMetric

java.lang.Object
  extended by mobios.dist.MSMSMetric
All Implemented Interfaces:
Serializable, Metric

public class MSMSMetric
extends Object
implements Metric

MSMSMetric is an implementation of a fuzzy cosine distance metric for comparing tandem spectra signatures. Within a given tolerance, elements of the TandemSpectra are equal.

Version:
2006.07.31
Author:
Smriti Ramakrishnan, Willard
See Also:
Serialized Form

Constructor Summary
MSMSMetric()
          Default constructor provides default values for min, max, step, and tolerance: min = 0; max = 0; step = 0; tol = MSMSConstants.MS_TOLERANCE
MSMSMetric(int min, int max, double step, double tol)
           
 
Method Summary
 double getDistance(IndexObject v1, IndexObject v2)
          Computes the distance between two objects.
 double getDistance(TandemSpectra v1, TandemSpectra v2)
          Computes the distance between two TandemSpectraes.
 String printDistance(TandemSpectra k1, TandemSpectra k2)
          Convert information of the instance into a String that contains the number of dimension and meaning for each dimension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSMSMetric

public MSMSMetric(int min,
                  int max,
                  double step,
                  double tol)
Parameters:
min -
max -
step -
tol -

MSMSMetric

public MSMSMetric()
Default constructor provides default values for min, max, step, and tolerance: min = 0; max = 0; step = 0; tol = MSMSConstants.MS_TOLERANCE

Method Detail

getDistance

public double getDistance(IndexObject v1,
                          IndexObject v2)
Description copied from interface: Metric
Computes the distance between two objects.

Specified by:
getDistance in interface Metric
Parameters:
v1 - the first IndexObject to compute distance on
v2 - the second IndexObject to compute distance on
Returns:
the distance between the two objects

getDistance

public double getDistance(TandemSpectra v1,
                          TandemSpectra v2)
Computes the distance between two TandemSpectraes.

Parameters:
v1 - the first TandemSpectra to compute distance on
v2 - the second TandemSpectra to compute distance on
Returns:
the distance between the two TandemSpectraes

printDistance

public String printDistance(TandemSpectra k1,
                            TandemSpectra k2)
Convert information of the instance into a String that contains the number of dimension and meaning for each dimension


Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group