static class ALOCI.Node extends java.lang.Object implements NumberVector
NumberVector.Factory<V extends NumberVector>
Modifier and Type | Field and 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
|
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
TYPE
Modifier | Constructor and Description |
---|---|
protected |
Node(int code,
double[] center,
int count,
int level,
java.util.List<ALOCI.Node> children)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleValue(int dimension)
Returns the value in the specified dimension as double.
|
int |
getCount()
Get count of subtree
|
long |
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, recursively
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
double[] |
toArray()
Returns a double array copy of this vector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
toString
final int code
final int count
final int level
java.util.List<ALOCI.Node> children
ALOCI.Node parent
double[] center
protected Node(int code, double[] center, int count, int level, java.util.List<ALOCI.Node> children)
code
- Node codecenter
- Center vectorcount
- Element countlevel
- Node levelchildren
- Children listpublic int getLevel()
public int getCount()
public long getSquareSum(int levels)
levels
- Depth to collectpublic long getCubicSum(int levels)
levels
- Level to collectpublic int getDimensionality()
FeatureVector
getDimensionality
in interface FeatureVector<java.lang.Number>
getDimensionality
in interface SpatialComparable
public double doubleValue(int dimension)
NumberVector
getValue(dim).doubleValue()
, but usually this is much more
efficient due to boxing/unboxing cost.doubleValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public long longValue(int dimension)
NumberVector
getValue(dim).longValue()
, but usually this is much more efficient
due to boxing/unboxing cost.longValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public double[] toArray()
NumberVector
toArray
in interface NumberVector
double[]
Copyright © 2019 ELKI Development Team. License information.