This adds a constraint on the weight vector, that a certain component must be set to a sparse index=value

@param component the component to fix
@param index     the index of the fixed sparse component
@param value     the value to fix at
181864
public void addSparseConstraint(int component, int index, double value) {
    constraints.add(new Constraint(component, index, value));
  }
1136432
private Integer parseDateComponent(final String component, final char padding) {
		if (component != null && component.indexOf(padding) == -1) {
			try {
				return Integer.valueOf(component);
			} catch (NumberFormatException e) {
				return null;
			}
		}
		return null;
	}
869963
public static void addComponent(final GridBagLayout gbl, final GridBagConstraints gbc,
		final int gridx, final int gridy, final Component component, final Container panelToAdd)
	{
		gbc.anchor = GridBagConstraints.CENTER;
		gbc.fill = GridBagConstraints.BOTH;
		gbc.insets = new Insets(5, 5, 5, 5);
		gbc.gridx = gridx;
		gbc.gridy = gridy;
		gbl.setConstraints(component, gbc);
		panelToAdd.add(component);
	}
742057
public void addLayoutComponent (Component comp, Object constraints)
    {
        if (!(constraints instanceof Point ||
              constraints instanceof Rectangle)) {
            throw new IllegalArgumentException("Constraints must be " +
                                               "Point or Rectangle");
        }
        _constraints.put(comp, constraints);
    }
1079138
public void setValueAtIn(Object value, int index, List aList) {
        Object cleanValue = cleanupValue(value);
        while (aList.size() <= index) {
            aList.add(null);
        }
        aList.set(index, cleanValue);
    }
955072
private int addComponent0(boolean increaseWriterIndex, int cIndex, ByteBuf buffer) {
        assert buffer != null;
        boolean wasAdded = false;
        try {
            checkComponentIndex(cIndex);

            // No need to consolidate - just add a component to the list.
            Component c = newComponent(buffer, 0);
            int readableBytes = c.length();

            addComp(cIndex, c);
            wasAdded = true;
            if (readableBytes > 0 && cIndex < componentCount - 1) {
                updateComponentOffsets(cIndex);
            } else if (cIndex > 0) {
                c.reposition(components[cIndex - 1].endOffset);
            }
            if (increaseWriterIndex) {
                writerIndex += readableBytes;
            }
            return cIndex;
        } finally {
            if (!wasAdded) {
                buffer.release();
            }
        }
    }
1067694
@Override
    public void add(int index, T element) {
        if (displacement != null) {
            super.add(index - displacement, element);
        } else {
            super.add(index, element);
        }
    }
1132060
public void setInitialConstraintsFrom(final Component comp) {
        gc = getConstraints(comp);
        if (gc == null) {
            throw new IllegalArgumentException(comp + " has no existing constraints");
        }
        setConstraints(comp, gc);
    }
223210
public void setComponent(String v) {
    if (ProcessingStep_Type.featOkTst && ((ProcessingStep_Type)jcasType).casFeat_component == null)
      jcasType.jcas.throwFeatMissing("component", "edu.cmu.lti.oaqa.framework.types.ProcessingStep");
    jcasType.ll_cas.ll_setStringValue(addr, ((ProcessingStep_Type)jcasType).casFeatCode_component, v);}
758443
public void set(int index, byte value) {
        Preconditions.checkState(!this.readOnly, "Cannot modify a read-only ByteArraySegment.");
        Preconditions.checkElementIndex(index, this.length, "index");
        this.array[index + this.startOffset] = value;
    }
566612
public void set(int index, long value) {
    assert index >= 0 : "index (" + index + ") should >= 0";
    assert index < length : "index (" + index + ") should < length (" + length + ")";
    Platform.putLong(baseObj, baseOffset + index * WIDTH, value);
  }
686737
private void removeColumn(int index)
    {
        TableColumn column = tableColumns.get(index);
        column.removePropertyChangeListener(widthListener);
        tableColumns.remove(index);
        JComponent component = customComponents.remove(index);
        remove(component);
        if (componentRemover != null)
        {
            componentRemover.accept(index);
        }
    }
161155
@Override
   public void setParameter(double value,int index){
        Compound component = substance.getVapor().getComponent();
        Alpha alpha = substance.getVapor().getAlpha();
        alpha.setParameter(value, component, index);
   }
80162
public static <T> void setInitialComponentValue(UIInput<T> inputComponent, T value) {
        if (value != null) {
            inputComponent.setValue(value);
        }
    }
620003
public void add(int index, DoubleVector v) {
        boolean added = indices.add(index);
        assert added : "Adding duplicate indices to candidate facility";
        if (sumVector == null) {
            sumVector = (v instanceof SparseVector)
                ? new SparseHashDoubleVector(v)
                : new DenseVector(v);
        }
        else {
            VectorMath.add(sumVector, v);
            centroid = null;
        }           
    }
1253886
public final void setConstraint(Constraint constraint) {
        Assert.notNull(constraint);
        if (!constraint.equals(this.constraint)) {
            if (this.constraint instanceof Observable) {
                ((Observable) constraint).deleteObserver(this);
            }
            this.constraint = constraint;
            if (constraint instanceof Observable) {
                ((Observable) constraint).addObserver(this);
            }
            fireContentsChanged(this, -1, -1);
        }
    }
282888
private static void setRawElem(Context cx, Scriptable target, long index,
                                   Object value) {
        if (value == NOT_FOUND) {
            deleteElem(target, index);
        } else {
            setElem(cx, target, index, value);
        }
    }