public class DiskCacheBasedFloatDistanceFunction extends AbstractDBIDRangeDistanceFunction
Modifier and Type | Class and Description |
---|---|
static class |
DiskCacheBasedFloatDistanceFunction.Parameterizer
Parameterization class.
|
AbstractDatabaseDistanceFunction.Instance<O>
Modifier and Type | Field and Description |
---|---|
private OnDiskUpperTriangleMatrix |
cache
The distance cache
|
static int |
FLOAT_CACHE_MAGIC
Magic to identify double cache matrices
|
private static Logging |
LOG
Class logger.
|
Constructor and Description |
---|
DiskCacheBasedFloatDistanceFunction(java.io.File matrixfile)
Constructor.
|
DiskCacheBasedFloatDistanceFunction(OnDiskUpperTriangleMatrix cache)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkRange(DBIDRange range)
Validate the range of DBIDs to use.
|
double |
distance(int i1,
int i2)
Compute the distance for two integer offsets.
|
boolean |
equals(java.lang.Object obj) |
distance, getInputTypeRestriction, instantiate
isMetric, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isMetric, isSquared, isSymmetric
private static final Logging LOG
public static final int FLOAT_CACHE_MAGIC
private OnDiskUpperTriangleMatrix cache
public DiskCacheBasedFloatDistanceFunction(OnDiskUpperTriangleMatrix cache)
cache
- Distance matrixpublic DiskCacheBasedFloatDistanceFunction(java.io.File matrixfile) throws java.io.IOException
matrixfile
- File namejava.io.IOException
public double distance(int i1, int i2)
DBIDRangeDistanceFunction
i1
- First offseti2
- Second offsetpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void checkRange(DBIDRange range)
DBIDRangeDistanceFunction
range
- DBID rangeCopyright © 2019 ELKI Development Team. License information.