
public class RandomStableDistanceFunction extends AbstractDBIDDistanceFunction<DoubleDistance>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RandomStableDistanceFunction.Parameterizer
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
private long | 
seed
Seed for reproducible random. 
 | 
static RandomStableDistanceFunction | 
STATIC
Static instance 
 | 
| Constructor and Description | 
|---|
RandomStableDistanceFunction(long seed)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
DoubleDistance | 
distance(DBIDRef o1,
        DBIDRef o2)
Returns the distance between the two objects specified by their object ids. 
 | 
boolean | 
equals(Object obj)  | 
DoubleDistance | 
getDistanceFactory()
Method to get the distance functions factory. 
 | 
int | 
hashCode()  | 
private double | 
pseudoRandom(long seed,
            int input)
Pseudo random number generator, adaption of the common rand48 generator
 which can be found in C (man drand48), Java and attributed to Donald Knuth. 
 | 
String | 
toString()  | 
getInputTypeRestriction, instantiate, isMetric, isSymmetricpublic static final RandomStableDistanceFunction STATIC
private long seed
public RandomStableDistanceFunction(long seed)
public DoubleDistance distance(DBIDRef o1, DBIDRef o2)
DBIDDistanceFunctiondistance in interface DBIDDistanceFunction<DoubleDistance>distance in class AbstractDBIDDistanceFunction<DoubleDistance>o1 - first object ido2 - second object idprivate double pseudoRandom(long seed,
                  int input)
seed - Seed valueinput - Input codepublic DoubleDistance getDistanceFactory()
DistanceFunctiongetDistanceFactory in interface DistanceFunction<DBID,DoubleDistance>getDistanceFactory in class AbstractDBIDDistanceFunction<DoubleDistance>