Package elki.outlier.lof
Class ALOCI.Node
- java.lang.Object
-
- elki.outlier.lof.ALOCI.Node
-
- All Implemented Interfaces:
FeatureVector<java.lang.Number>,NumberVector,SpatialComparable
- Enclosing class:
- ALOCI<V extends NumberVector>
static class ALOCI.Node extends java.lang.Object implements NumberVector
Node of the ALOCI Quadtree- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.data.NumberVector
NumberVector.Factory<V extends NumberVector>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]centerCenter vector(package private) java.util.List<ALOCI.Node>childrenChild nodes, may be null(package private) intcodePosition code(package private) intcountNumber of elements(package private) intlevelLevel of node(package private) ALOCI.NodeparentParent node-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
Fields inherited from interface elki.data.NumberVector
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNode(int code, double[] center, int count, int level, java.util.List<ALOCI.Node> children)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledoubleValue(int dimension)Returns the value in the specified dimension as double.intgetCount()Get count of subtreelonggetCubicSum(int levels)Get cubic sum.intgetDimensionality()The dimensionality of the vector space where of this FeatureVector of V is an element.intgetLevel()Get level of node.longgetSquareSum(int levels)Get sum of squares, recursivelylonglongValue(int dimension)Returns the value in the specified dimension as long.double[]toArray()Returns a double array copy of this vector.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.data.FeatureVector
toString
-
Methods inherited from interface elki.data.NumberVector
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
-
-
-
-
Field Detail
-
code
final int code
Position code
-
count
final int count
Number of elements
-
level
final int level
Level of node
-
children
java.util.List<ALOCI.Node> children
Child nodes, may be null
-
parent
ALOCI.Node parent
Parent node
-
center
double[] center
Center vector
-
-
Constructor Detail
-
Node
protected Node(int code, double[] center, int count, int level, java.util.List<ALOCI.Node> children)Constructor.- Parameters:
code- Node codecenter- Center vectorcount- Element countlevel- Node levelchildren- Children list
-
-
Method Detail
-
getLevel
public int getLevel()
Get level of node.- Returns:
- Level of node
-
getCount
public int getCount()
Get count of subtree- Returns:
- subtree count
-
getSquareSum
public long getSquareSum(int levels)
Get sum of squares, recursively- Parameters:
levels- Depth to collect- Returns:
- Sum of squares
-
getCubicSum
public long getCubicSum(int levels)
Get cubic sum.- Parameters:
levels- Level to collect- Returns:
- sum of cubes
-
getDimensionality
public int getDimensionality()
Description copied from interface:FeatureVectorThe dimensionality of the vector space where of this FeatureVector of V is an element.- Specified by:
getDimensionalityin interfaceFeatureVector<java.lang.Number>- Specified by:
getDimensionalityin interfaceSpatialComparable- Returns:
- the number of dimensions of this FeatureVector of V
-
doubleValue
public double doubleValue(int dimension)
Description copied from interface:NumberVectorReturns the value in the specified dimension as double.Note: this might seem redundant with respect to
getValue(dim).doubleValue(), but usually this is much more efficient due to boxing/unboxing cost.- Specified by:
doubleValuein interfaceNumberVector- Parameters:
dimension- the desired dimension, where 0 ≤ dimension <this.getDimensionality()- Returns:
- the value in the specified dimension
-
longValue
public long longValue(int dimension)
Description copied from interface:NumberVectorReturns the value in the specified dimension as long.Note: this might seem redundant with respect to
getValue(dim).longValue(), but usually this is much more efficient due to boxing/unboxing cost.- Specified by:
longValuein interfaceNumberVector- Parameters:
dimension- the desired dimension, where 0 ≤ dimension <this.getDimensionality()- Returns:
- the value in the specified dimension
-
toArray
public double[] toArray()
Description copied from interface:NumberVectorReturns a double array copy of this vector.- Specified by:
toArrayin interfaceNumberVector- Returns:
- Copy as
double[]
-
-