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[]
center
Center vector(package private) java.util.List<ALOCI.Node>
children
Child nodes, may be null(package private) int
code
Position code(package private) int
count
Number of elements(package private) int
level
Level of node(package private) ALOCI.Node
parent
Parent 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 protected
Node(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 double
doubleValue(int dimension)
Returns the value in the specified dimension as double.int
getCount()
Get count of subtreelong
getCubicSum(int levels)
Get cubic sum.int
getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is an element.int
getLevel()
Get level of node.long
getSquareSum(int levels)
Get sum of squares, recursivelylong
longValue(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:FeatureVector
The dimensionality of the vector space where of this FeatureVector of V is an element.- Specified by:
getDimensionality
in interfaceFeatureVector<java.lang.Number>
- Specified by:
getDimensionality
in interfaceSpatialComparable
- Returns:
- the number of dimensions of this FeatureVector of V
-
doubleValue
public double doubleValue(int dimension)
Description copied from interface:NumberVector
Returns 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:
doubleValue
in 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:NumberVector
Returns 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:
longValue
in 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:NumberVector
Returns a double array copy of this vector.- Specified by:
toArray
in interfaceNumberVector
- Returns:
- Copy as
double[]
-
-