ostore.introspect
Interface Distance
- All Superinterfaces:
- Comparable, QuickSerializable
- All Known Implementing Classes:
- Distance.InfiniteDistance, SimpleRealTime.Distance
- public interface Distance
- extends Comparable, QuickSerializable
Semantic distance between two objects. Distances must be comparable.
Subclasses must handle INFINITY distance correctly.
- Version:
- $Id: Distance.java,v 1.4 2003/04/03 01:10:22 jeffpang Exp $
- Author:
- Jeff Pang
INFINITY
public static final Distance INFINITY
- Distance representing infinite distance.
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
- Returns:
this == other
sum
public Distance sum(Distance other)
- Returns:
this + other
difference
public Distance difference(Distance other)
- Returns:
this - other
pow
public Distance pow(int power)
- Returns:
this^pow
scale
public Distance scale(double factor)
- Returns:
factor * this