Package elki.outlier.lof
Class ALOCI.ALOCIQuadTree
- java.lang.Object
-
- elki.outlier.lof.ALOCI.ALOCIQuadTree
-
static class ALOCI.ALOCIQuadTree extends java.lang.ObjectSimple quadtree for ALOCI. Not storing the actual objects, just the counts.Furthermore, the quadtree can be shifted by a specified vector, wrapping around min/max
- Author:
- Jonathan von Brünken, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private double[]minTree parametersprivate intnminMaximum fill for a page before splittingprivate elki.database.relation.Relation<? extends elki.data.NumberVector>relationRelation indexed.(package private) ALOCI.NoderootTree rootprivate double[]shiftTree parametersprivate double[]widthTree parameters
-
Constructor Summary
Constructors Constructor Description ALOCIQuadTree(double[] min, double[] max, double[] shift, int nmin, elki.database.relation.Relation<? extends elki.data.NumberVector> relation)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbulkLoad(double[] lmin, double[] lmax, java.util.List<ALOCI.Node> children, elki.database.ids.ArrayModifiableDBIDs ids, int start, int end, int dim, int level, int code)Bulk load the treeALOCI.NodefindClosestNode(elki.data.NumberVector vec, int tlevel)Find the closest node (of depthtlevelor above, if there is no node at this depth) for the given vector.private doublegetShiftedDim(elki.data.NumberVector obj, int dim, int level)Shift and wrap a single dimension.
-
-
-
Field Detail
-
shift
private double[] shift
Tree parameters
-
min
private double[] min
Tree parameters
-
width
private double[] width
Tree parameters
-
nmin
private int nmin
Maximum fill for a page before splitting
-
root
ALOCI.Node root
Tree root
-
relation
private elki.database.relation.Relation<? extends elki.data.NumberVector> relation
Relation indexed.
-
-
Constructor Detail
-
ALOCIQuadTree
public ALOCIQuadTree(double[] min, double[] max, double[] shift, int nmin, elki.database.relation.Relation<? extends elki.data.NumberVector> relation)Constructor.- Parameters:
min- Minimum coordinatesmax- Maximum coordinatesshift- Tree shift offsetnmin- Maximum size for a page to splitrelation- Relation to index
-
-
Method Detail
-
bulkLoad
private void bulkLoad(double[] lmin, double[] lmax, java.util.List<ALOCI.Node> children, elki.database.ids.ArrayModifiableDBIDs ids, int start, int end, int dim, int level, int code)Bulk load the tree- Parameters:
lmin- Subtree minimum (unshifted, will be modified)lmax- Subtree maximum (unshifted, will be modified)children- List of children for current parentids- IDs to processstart- Start of ids subintervalend- End of ids subintervaldim- Current dimensionlevel- Current tree levelcode- Bit code of node position
-
getShiftedDim
private double getShiftedDim(elki.data.NumberVector obj, int dim, int level)Shift and wrap a single dimension.- Parameters:
obj- Objectdim- Dimensionlevel- Level (controls scaling/wrapping!)- Returns:
- Shifted position
-
findClosestNode
public ALOCI.Node findClosestNode(elki.data.NumberVector vec, int tlevel)
Find the closest node (of depthtlevelor above, if there is no node at this depth) for the given vector.- Parameters:
vec- Query vectortlevel- Target level- Returns:
- Node
-
-