Takes atoms and adds or removes them from the index depending on the
 passed operation.
332378
def operate(operation, atoms)
      # ActiveSupport always available?
      atoms_sorted = ActiveSupport::OrderedHash.new

      # Sort the atoms into the appropriate shards for writing to individual
      # files.
      atoms.each do |atom_name, records|
        (atoms_sorted[encoded_prefix(atom_name)] ||= ActiveSupport::OrderedHash.new)[atom_name] = records
      end

      atoms_sorted.each do |e_p, atoms|
        path = @path.join(e_p.to_s + INDEX_FILE_EXTENSION)

        lock_file(path) do

          if path.exist?
            from_file = path.open do |f|
              Marshal.load(f)
            end
          else
            from_file = ActiveSupport::OrderedHash.new
          end

          atoms = from_file.merge(atoms){ |k,o,n| o.send(operation, n) }

          write_file(path) do |f|
            Marshal.dump(atoms,f)
          end
        end # end lock.

      end
    end
1343365
@Override
    public boolean remove(Object o) {
        IAtomContainer atomContainer = (IAtomContainer) o;

        // we should never have a null conformer
        if (atomContainer == null) return false;

        int index = indexOf(atomContainer);
        if (index >= 0) {
            remove(index);
            return true;
        }
        return false;
    }
810529
def add_index_operation(self, name, operations):
        
        if name not in self._index_operations:
            self._add_io(name, operations)
        else:
            raise AttributeError("An index operation with the name {} was already taken".format(name))
1111929
def _update_indexes_for_mutated_object(collection, obj):
    """"""
    for index in _db[collection].indexes.values():
        _remove_from_index(index, obj)
        _add_to_index(index, obj)
399060
def remove(self, key, value, element):
        """"""
        self.neoindex.delete(key, value, element.neoelement)
628751
@Override
    public void setAtoms(IAtom[] atoms) {
        this.atoms = atoms;
        atomCount = atoms.length;
        notifyChanged();
    }
1042186
public void removeAt(int index) {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                mOriginalValues.remove(index);
            } else {
                mObjects.remove(index);
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
    }
303861
private void removeObservation( int index ) {
        final int N = y.numRows-1;
        final double d[] = y.data;

        // shift
        for( int i = index; i < N; i++ ) {
            d[i] = d[i+1];
        }
        y.numRows--;
    }
272720
def removeByIndex(self, index):
        """"""
        if index < len(self._invites) -1 and \
           index >=0:
            self._invites.remove(index)
931706
def remove(self, index):
        '''
        
        '''
        raise NotImplementedError
        if hasattr(index, '__iter__'):
            ind = set(index)
        else:
            ind = [index]

        # Rebuild relationships, excluding the provided indices
        self._relationships = [r for i, r in enumerate(self._relationships) if i not in ind]
265746
@Override
    public void add(int index, T elem) {
        /* Confirm the validity of the index. */
        if (index < 0 || index >= size())
            throw new IndexOutOfBoundsException("Index " + index + ", size " + size());

        /* Add a dummy element to ensure that everything resizes correctly.
         * There's no reason to repeat the logic.
         */
        add(null);

        /* Next, we need to shuffle down every element that appears after
         * the inserted element.  We'll do this using our own public interface.
         */
        for (int i = size(); i > index; ++i)
            set(i, get(i - 1));

        /* Finally, write the element. */
        set(index, elem);
    }
60531
public void addToCell(int index, int element) {
        if (cells.size() < index + 1) {
            addSingletonCell(element);
        } else {
            cells.get(index).add(element);
        }
    }
1366423
@Override
    public void setAtom(IAtom atom, int position) {
        if (atoms[position] == null && atom != null) atomCount++;
        if (atoms[position] != null && atom == null) atomCount--;
        atoms[position] = atom;
    }
810713
private void fastRemove(int index) {
        modCount++;
        int numMoved = size - index - 1;
        if (numMoved > 0)
            System.arraycopy(elementData, index+1, elementData, index,
                             numMoved);
        elementData[--size] = null; // clear to let GC do its work
    }
745201
private T doRemove(int index) {
        keys[index]   = 0;
        states[index] = REMOVED;
        final Object previous = values[index];
        values[index] = missingEntries;
        --size;
        ++count;
        return (T)previous;
    }
1212452
def replace(index, middleware, *args, &block)
      if index.is_a?(Integer)
        delete(index)
        insert(index, middleware, *args, &block)
      else
        insert_before(index, middleware, *args, &block)
        delete(index)
      end
    end
951649
def append(self):
        """"""
        target_index = get_index_from_alias(self.alias_name)
        if not target_index:
            self.replace()
        else:
            self.index_all(target_index)