/** * Removes the value at <tt>offset</tt> from the list. * * @param offset an <code>int</code> value * @return the value previously stored at offset. */ public double remove(int offset) { double old = get(offset); remove(offset, 1); return old; }
/** * @param _value la valeur a enlever * @param _c si non nul ajoute la commande adaptee * @return true si modif */ public boolean removeXValue(final double _value, final CtuluCommandContainer _c) { final int index = getIndexOfX(_value); if (index >= 0) { final double oldT = t_.remove(index); final double oldV = val_.remove(index); if (_c != null) { _c.addCmd(new CommandRemove(oldT, oldV)); } if (listener_ != null) { listener_.evolutionChanged(this); } return true; } return false; }
/** * @param _idx l'indice a enlever * @param _c si non la commande generee sera ajoutee a ce container. * @return true si indice enlever : indice appartenant a [0,nbVal[ */ public boolean remove(final int _idx, final CtuluCommandContainer _c) { if ((_idx >= 0) && (_idx < getNbValues())) { final double oldT = t_.remove(_idx); final double oldV = val_.remove(_idx); if (listener_ != null) { listener_.evolutionChanged(this); } if (_c != null) { _c.addCmd(new CommandRemove(oldT, oldV)); } return true; } return false; }
/** * @param _idx l'indice a modifier * @param _t la nouvelle valeur pour le temps * @param _v la nouvelle valeur * @param _c Si non nul, la commande generee est ajoutee * @return true si modification */ public boolean setValue(final int _idx, final double _t, final double _v, final CtuluCommandContainer _c) { if ((_idx >= 0) && (_idx < getNbValues()) && isValuesValid(_t, _v) && ((getX(_idx) != _t) || (getY(_idx) != _v))) { final double oldX = t_.remove(_idx); final double oldY = val_.remove(_idx); put(_t, _v); if (listener_ != null) { listener_.evolutionChanged(this); } if (_c != null) { _c.addCmd(new CommandReplace(oldX, oldY, _t, _v)); } return true; } return false; }
centroids[whichCluster].distances.remove(idxToRemove); visitedClusters[whichCluster] = true;
if (feat == rem) { feats.remove(j); weigths.remove(j); if (j < feats.size() && removedFeatures.hasNext()) { feat = feats.getQuick(j);