Interface ArrayDBIDs

    • Method Detail

      • assignVar

        DBIDVar assignVar​(int index,
                          DBIDVar var)
        Assign a DBID variable the value of position index.
        Parameters:
        index - Position
        var - Variable to assign the value to.
      • size

        int size()
        Size of the DBID "collection".
        Specified by:
        size in interface DBIDs
        Returns:
        size
      • binarySearch

        int binarySearch​(DBIDRef key)
        Search for the position of the given key, assuming that the data set is sorted. For unsorted arrays, the result is undefined.

        For keys not found, -(1+insertion position) is returned, as for Java Collections.binarySearch(java.util.List<? extends java.lang.Comparable<? super T>>, T)

        Parameters:
        key - Key to search for
        Returns:
        Offset of key
      • slice

        ArrayDBIDs slice​(int begin,
                         int end)
        Slice a subarray (as view, not copy!)
        Parameters:
        begin - Begin (inclusive)
        end - End (exclusive)
        Returns:
        Array slice.