Class ALOCI.Node

  • All Implemented Interfaces:
    elki.data.FeatureVector<java.lang.Number>, elki.data.NumberVector, elki.data.spatial.SpatialComparable
    Enclosing class:
    ALOCI<V extends elki.data.NumberVector>

    static class ALOCI.Node
    extends java.lang.Object
    implements elki.data.NumberVector
    Node of the ALOCI Quadtree
    Author:
    Erich Schubert
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface elki.data.NumberVector

        elki.data.NumberVector.Factory<V extends elki.data.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)  
      int getCount()
      Get count of subtree
      long getCubicSum​(int levels)
      Get cubic sum.
      int getDimensionality()  
      int getLevel()
      Get level of node.
      long getSquareSum​(int levels)
      Get sum of squares, recursively
      long longValue​(int dimension)  
      double[] toArray()  
      • 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
      • 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 code
        center - Center vector
        count - Element count
        level - Node level
        children - 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()
        Specified by:
        getDimensionality in interface elki.data.FeatureVector<java.lang.Number>
        Specified by:
        getDimensionality in interface elki.data.spatial.SpatialComparable
      • doubleValue

        public double doubleValue​(int dimension)
        Specified by:
        doubleValue in interface elki.data.NumberVector
      • longValue

        public long longValue​(int dimension)
        Specified by:
        longValue in interface elki.data.NumberVector
      • toArray

        public double[] toArray()
        Specified by:
        toArray in interface elki.data.NumberVector