public class DiskCacheBasedDoubleDistanceFunction extends AbstractDBIDRangeDistanceFunction
Modifier and Type | Class and Description |
---|---|
static class |
DiskCacheBasedDoubleDistanceFunction.Parameterizer
Parameterization class.
|
AbstractDatabaseDistanceFunction.Instance<O>
Modifier and Type | Field and Description |
---|---|
private OnDiskUpperTriangleMatrix |
cache
The distance matrix
|
static int |
DOUBLE_CACHE_MAGIC
Magic to identify double cache matrices
|
private static Logging |
LOG
Class logger.
|
Constructor and Description |
---|
DiskCacheBasedDoubleDistanceFunction(java.io.File matrixfile)
Constructor.
|
DiskCacheBasedDoubleDistanceFunction(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 DOUBLE_CACHE_MAGIC
private OnDiskUpperTriangleMatrix cache
public DiskCacheBasedDoubleDistanceFunction(OnDiskUpperTriangleMatrix cache)
cache
- Distance matrixpublic DiskCacheBasedDoubleDistanceFunction(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 void checkRange(DBIDRange range)
DBIDRangeDistanceFunction
range
- DBID rangepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.