Package elki.outlier.distance
Class HilOut.HilbertFeatures
- java.lang.Object
-
- elki.outlier.distance.HilOut.HilbertFeatures
-
- Enclosing class:
- HilOut<O extends NumberVector>
class HilOut.HilbertFeatures extends java.lang.ObjectClass organizing the data points along a hilbert curve.- Author:
- Jonathan von Brünken
-
-
Field Summary
Fields Modifier and Type Field Description (package private) doublediameterData space diameter(package private) double[]minData space minimumsprivate ObjectHeap<HilOut.HilFeature>out"OUT"(package private) HilOut.HilFeature[]pfHilbert representation ("point features")(package private) Relation<O>relationRelation indexed(package private) doubleshiftCurrent curve shiftprivate java.util.Set<HilOut.HilFeature>topTop candidatesprivate ObjectHeap<HilOut.HilFeature>wlb"WLB"
-
Constructor Summary
Constructors Constructor Description HilbertFeatures(Relation<O> relation, double[] min, double diameter)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private doubleboxRadius(int i, int a, int b)boxRadius function calculate the Boxradiusprivate doublefastUpperBound(int i)fastUpperBound function calculates an upper Bound as k*maxDist(pf[i], smallest neighborhood)private doublegetDimForObject(NumberVector obj, int dim)Get the (projected) position of the object in dimension dim.private voidinitialize(double shift)Hilbert function to fill pf with shifted Hilbert values.private doublemaxDistLevel(DBID id, int level)maxDist function calculate the maximal Distance from Vector p to the border of the corresponding r-region at the given levelprivate intmaxRegLevel(int ref, int q)Level of the maximum region containing ref but not qprivate doubleminDistLevel(DBID id, int level)minDist function calculate the minimal Distance from Vector p to the border of the corresponding r-region at the given levelprivate intminRegLevel(int a, int b)minReg function calculate the minimal r-region level containing two pointsprivate intnumberSharedLevels(long[] a, long[] b)Number of levels sharedprivate voidupdateOUT(int i)updateOUT function inserts pf[i] in out.private voidupdateWLB(int i)updateWLB function inserts pf[i] in wlb.
-
-
-
Field Detail
-
relation
Relation<O extends NumberVector> relation
Relation indexed
-
pf
HilOut.HilFeature[] pf
Hilbert representation ("point features")
-
min
double[] min
Data space minimums
-
diameter
double diameter
Data space diameter
-
shift
double shift
Current curve shift
-
top
private java.util.Set<HilOut.HilFeature> top
Top candidates
-
out
private ObjectHeap<HilOut.HilFeature> out
"OUT"
-
wlb
private ObjectHeap<HilOut.HilFeature> wlb
"WLB"
-
-
Method Detail
-
initialize
private void initialize(double shift)
Hilbert function to fill pf with shifted Hilbert values. Also calculates the number current Outlier candidates capital_n_star- Parameters:
shift- the new shift factor
-
updateOUT
private void updateOUT(int i)
updateOUT function inserts pf[i] in out.- Parameters:
i- position in pf of the feature to be inserted
-
updateWLB
private void updateWLB(int i)
updateWLB function inserts pf[i] in wlb.- Parameters:
i- position in pf of the feature to be inserted
-
fastUpperBound
private double fastUpperBound(int i)
fastUpperBound function calculates an upper Bound as k*maxDist(pf[i], smallest neighborhood)- Parameters:
i- position in pf of the feature for which the bound should be calculated
-
minDistLevel
private double minDistLevel(DBID id, int level)
minDist function calculate the minimal Distance from Vector p to the border of the corresponding r-region at the given level- Parameters:
id- Object IDlevel- Level of the corresponding r-region
-
maxDistLevel
private double maxDistLevel(DBID id, int level)
maxDist function calculate the maximal Distance from Vector p to the border of the corresponding r-region at the given level- Parameters:
id- Object IDlevel- Level of the corresponding r-region
-
numberSharedLevels
private int numberSharedLevels(long[] a, long[] b)Number of levels shared- Parameters:
a- First bitsetb- Second bitset- Returns:
- Number of level shared
-
minRegLevel
private int minRegLevel(int a, int b)minReg function calculate the minimal r-region level containing two points- Parameters:
a- index of first point in pfb- index of second point in pf- Returns:
- Level of the r-region
-
maxRegLevel
private int maxRegLevel(int ref, int q)Level of the maximum region containing ref but not q- Parameters:
ref- Reference pointq- Query point- Returns:
- Number of bits shared across all dimensions
-
boxRadius
private double boxRadius(int i, int a, int b)boxRadius function calculate the Boxradius- Parameters:
i- index of first pointa- index of second pointb- index of third point- Returns:
- box radius
-
getDimForObject
private double getDimForObject(NumberVector obj, int dim)
Get the (projected) position of the object in dimension dim.- Parameters:
obj- Objectdim- Dimension- Returns:
- Projected and shifted position
-
-