code: public static ModifiableDBIDs ensureModifiable(DBIDs ids) {
      return ids instanceof ModifiableDBIDs ? (ModifiableDBIDs) ids : //
          ids instanceof HashSetDBIDs ? newHashSet(ids) : newArray(ids);
    }
docs: Ensure modifiable.
  
  @param ids IDs
  @return Modifiable DBIDs.