Interface ModifiableDoubleDBIDList

    • Method Detail

      • add

        void add​(double distance,
                 DBIDRef id)
        Add an object to this result.
        Parameters:
        distance - Distance to add
        id - DBID to add
      • add

        void add​(DoubleDBIDPair pair)
        Add an element.
        Parameters:
        pair - Pair to add
      • swap

        void swap​(int i,
                  int j)
        Swap to entries in the list.
        Parameters:
        i - First entry
        j - Second entry
      • remove

        void remove​(int p)
        Remove the entry at position p by shifting the remainder forward.
        Parameters:
        p - Entry offset to remove
      • removeSwap

        void removeSwap​(int p)
        Remove the entry at position p by swapping with the last (not preserving the order).
        Parameters:
        p - Entry offset to remove
      • iter

        DoubleDBIDListMIter iter()
        Description copied from interface: DBIDs
        Get a DBID iterator (a more efficient API).

        Example:

         
         for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
           NumberVector vec = relation.get(iter); // iter is a temporary object reference
         }
         
         
        Specified by:
        iter in interface DBIDs
        Specified by:
        iter in interface DoubleDBIDList
        Returns:
        iterator