Class LOCI.DoubleIntArrayList

  • Enclosing class:
    LOCI<O>

    private static class LOCI.DoubleIntArrayList
    extends java.lang.Object
    Array of double-int values.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double[] keys
      Double keys
      (package private) int size
      Used size
      (package private) int[] vals
      Integer values
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleIntArrayList​(int alloc)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void append​(double key, int val)
      Append a key-value pair.
      int find​(double search)
      Find the last position with a smaller or equal key.
      double getDouble​(int i)
      Get the key at the given position.
      int getInt​(int i)
      Get the value at the given position.
      void setValue​(int i, int val)
      Get the value at the given position.
      int size()
      Collection size.
      void sort()
      Sort the array list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • keys

        double[] keys
        Double keys
      • vals

        int[] vals
        Integer values
      • size

        int size
        Used size
    • Constructor Detail

      • DoubleIntArrayList

        public DoubleIntArrayList​(int alloc)
        Constructor.
        Parameters:
        alloc - Initial allocation.
    • Method Detail

      • size

        public int size()
        Collection size.
        Returns:
        Size
      • getDouble

        public double getDouble​(int i)
        Get the key at the given position.
        Parameters:
        i - Position
        Returns:
        Key
      • getInt

        public int getInt​(int i)
        Get the value at the given position.
        Parameters:
        i - Position
        Returns:
        Value
      • setValue

        public void setValue​(int i,
                             int val)
        Get the value at the given position.
        Parameters:
        i - Position
        val - New value
      • append

        public void append​(double key,
                           int val)
        Append a key-value pair.
        Parameters:
        key - Key to append
        val - Value to append.
      • find

        public int find​(double search)
        Find the last position with a smaller or equal key.
        Parameters:
        search - Key
        Returns:
        Position
      • sort

        public void sort()
        Sort the array list.