Class CFNode<L extends ClusterFeature>

  • Type Parameters:
    L - Cluster feature type
    All Implemented Interfaces:
    AsClusterFeature

    public class CFNode<L extends ClusterFeature>
    extends java.lang.Object
    implements AsClusterFeature
    Interface for TreeNode
    Since:
    0.8.0
    Author:
    Andreas Lang
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private L cf
      Cluster feature
      private java.lang.Object[] children
      Children of the TreeNode
    • Constructor Summary

      Constructors 
      Constructor Description
      CFNode​(L cf, int capacity)
      Constructor
    • Field Detail

      • children

        private java.lang.Object[] children
        Children of the TreeNode
    • Constructor Detail

      • CFNode

        public CFNode​(L cf,
                      int capacity)
        Constructor
        Parameters:
        capacity - Fanout of the Tree
    • Method Detail

      • setChild

        public void setChild​(int i,
                             AsClusterFeature cf)
        Set child with index i to CF cf
        Parameters:
        i - Index
        cf - Clustering Feature
      • setChild

        public boolean setChild​(AsClusterFeature node)
        Add a child without statistics
        Parameters:
        node - child
        Returns:
        success
      • getChild

        public AsClusterFeature getChild​(int i)
        Get CF from Index i
        Parameters:
        i - Index
        Returns:
        CF
      • add

        public boolean add​(AsClusterFeature node)
        Add a subtree
        Parameters:
        node - Subtree
        Returns:
        success
      • add

        public void add​(int i,
                        AsClusterFeature node)
        Add a subtree.
        Parameters:
        i - Index
        node - Tree node
      • capacity

        public int capacity()
        Get the node capacity.
        Returns:
        Node capacity