ostore.introspect
Class SimpleRealTime.Distance
java.lang.Object
|
+--ostore.introspect.SimpleRealTime.Distance
- All Implemented Interfaces:
- Comparable, Distance, QuickSerializable
- Enclosing class:
- SimpleRealTime
- public static class SimpleRealTime.Distance
- extends Object
- implements Distance
Metric distance between two SimpleRealTime
s.
- Version:
- $Id: SimpleRealTime.java,v 1.5 2003/04/03 01:10:22 jeffpang Exp $
- Author:
- Jeff Pang
SimpleRealTime.Distance
public SimpleRealTime.Distance(double val)
- Constructor
SimpleRealTime.Distance
public SimpleRealTime.Distance(InputBuffer buffer)
throws QSException
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
equals
public boolean equals(Object other)
- Specified by:
equals
in interface Distance
- Overrides:
equals
in class Object
- Returns:
this == other
sum
public Distance sum(Distance other)
- Specified by:
sum
in interface Distance
- Returns:
this + other
difference
public Distance difference(Distance other)
- Specified by:
difference
in interface Distance
- Returns:
this - other
pow
public Distance pow(int power)
- Specified by:
pow
in interface Distance
- Returns:
this^pow
scale
public Distance scale(double factor)
- Specified by:
scale
in interface Distance
- Returns:
factor * this
compareTo
public int compareTo(Object other)
- Specified by:
compareTo
in interface Comparable
getValue
public double getValue()
- Get the value of this distance as a
double
toString
public String toString()
- Overrides:
toString
in class Object