Add a dimension.
@param c    the resource capacity of each of the nodes
@param cUse the resource usage of each of the cSlices
@param dUse the resource usage of each of the dSlices
484098
@Override
    public void addDim(List<IntVar> c, int[] cUse, IntVar[] dUse) {
        capacities.add(c);
        cUsages.add(cUse);
        dUsages.add(dUse);
    }
605349
public ComplexFloat addi(ComplexFloat c, ComplexFloat result) {
    if (this == result) {
      r += c.r;
      i += c.i;
    } else {
      result.r = r + c.r;
      result.i = i + c.i;
    }
    return result;
  }
312077
private void addNode(final TrieNode<V> node, final CharSequence key,
                         final int beginIndex, final TrieNode<V> newNode) {
        final int lastKeyIndex = key.length() - 1;
        TrieNode<V> currentNode = node;
        int i = beginIndex;

        for (; i < lastKeyIndex; i++) {
            final TrieNode<V> nextNode = new TrieNode<V>(false);
            currentNode.children.put(key.charAt(i), nextNode);
            currentNode = nextNode;
        }

        currentNode.children.put(key.charAt(i), newNode);
    }
341825
public void add(double element) {
	// overridden for performance only.  
	if (size == elements.length) ensureCapacity(size + 1); 
	elements[size++] = element;
}
737677
public static int cusparseSsctr(
        cusparseHandle handle, 
        int nnz, 
        Pointer xVal, 
        Pointer xInd, 
        Pointer y, 
        int idxBase)
    {
        return checkResult(cusparseSsctrNative(handle, nnz, xVal, xInd, y, idxBase));
    }
1184127
public void provideCapacity(final int capacity) {
        if (c.length >= capacity) {
            return;
        }
        int newcapacity = ((capacity * 3) >> 1) + 1;
        char[] newc = new char[newcapacity];
        System.arraycopy(c, 0, newc, 0, length);
        c = newc;
    }
153731
private void addCollectionEdges(Vertex vertex, CollectionDescriptor cds)
    {
        ObjectEnvelope envelope = vertex.getEnvelope();
        Object col = cds.getPersistentField().get(envelope.getRealObject());
        Object[] refObjects;
        if (col == null || (ProxyHelper.isCollectionProxy(col) && !ProxyHelper.getCollectionProxy(col).isLoaded()))
        {
            refObjects = EMPTY_OBJECT_ARRAY;
        }
        else
        {
            refObjects = BrokerHelper.getCollectionArray(col);
        }
        Class refClass = cds.getItemClass();

        for (int i = 0; i < vertices.length; i++)
        {
            Edge edge = null;
            Vertex refVertex = vertices[i];
            ObjectEnvelope refEnvelope = refVertex.getEnvelope();

            if (refClass.isInstance(refEnvelope.getRealObject()))
            {
                if (containsObject(refEnvelope.getRealObject(), refObjects))
                {
                    if (cds.isMtoNRelation())
                    {
                        edge = buildConcreteMNEdge(vertex, refVertex);
                    }
                    else
                    {
                        edge = buildConcrete1NEdge(vertex, refVertex);
                    }
                }
                else
                {
                    if (cds.isMtoNRelation())
                    {
                        edge = buildPotentialMNEdge(vertex, refVertex);
                    }
                    else
                    {
                        edge = buildPotential1NEdge(vertex, refVertex);
                    }
                }
            }
            if (edge != null)
            {
                if (!edgeList.contains(edge))
                {
                    edgeList.add(edge);
                }
                else
                {
                    edge.increaseWeightTo(edge.getWeight());
                }
            }
        }
    }
583312
protected BufferedImage createLcdImage(final Rectangle2D BOUNDS, final LcdColor LCD_COLOR, final Paint CUSTOM_LCD_BACKGROUND, final BufferedImage IMAGE) {
        return LCD_FACTORY.create_LCD_Image(BOUNDS, LCD_COLOR, CUSTOM_LCD_BACKGROUND, IMAGE);
    }
1136624
public void addNode(RNode newNode) {
        graph.add(newNode);
        graphBitSet.set(graph.size() - 1);
    }
504644
public void setWrapperCacheSize(int cacheSize)
    {
        wrapperCache.setCachePreferredMaxSize(cacheSize);
        int updatedCacheSize = getBeanIdCacheSize(cacheSize);
        beanIdCache.setSize(updatedCacheSize);
    }
1289063
public void add(double x) {
        Cell[] as; long b, v; int[] hc; Cell a; int n;
        if ((as = cells) != null ||
                !casBase(b = base,
                        Double.doubleToRawLongBits
                                (Double.longBitsToDouble(b) + x))) {
            boolean uncontended = true;
            if ((hc = threadHashCode.get()) == null ||
                    as == null || (n = as.length) < 1 ||
                    (a = as[(n - 1) & hc[0]]) == null ||
                    !(uncontended = a.cas(v = a.value,
                            Double.doubleToRawLongBits
                                    (Double.longBitsToDouble(v) + x))))
                retryUpdate(Double.doubleToRawLongBits(x), hc, uncontended);
        }
    }
332713
public void setSize(final ColumnSize firstSize, final ColumnSize... otherSizes) {
        addEnumVarargsValues(new ColumnSize[]{firstSize}, ColumnSize.class, true);
        addEnumVarargsValues(otherSizes, ColumnSize.class, false);
    }
394418
public void setTupleSize( int tupleSize)
    {
    Integer onceSize =
      onceTuples_.isEmpty()
      ? null
      : getOnceTuples().next().size();

    if( !(onceSize == null || onceSize == tupleSize))
      {
      throw new IllegalArgumentException( "Tuple size=" + tupleSize + " is not compatible with existing once-only tuple size=" + onceSize);
      }
    
    tupleSize_ = tupleSize;
    }
1021274
def add_dimension(dimension,**kwargs):
    
    if numpy.isscalar(dimension):
        # If it is a scalar, converts to an Object
        dimension = {'name': dimension}

    new_dimension = Dimension()
    new_dimension.name = dimension["name"]

    if "description" in dimension and dimension["description"] is not None:
        new_dimension.description = dimension["description"]
    if "project_id" in dimension and dimension["project_id"] is not None:
        new_dimension.project_id = dimension["project_id"]

    # Save on DB
    db.DBSession.add(new_dimension)
    db.DBSession.flush()

    # Load all the record
    db_dimension = db.DBSession.query(Dimension).filter(Dimension.id==new_dimension.id).one()

    return JSONObject(db_dimension)
589197
private void addAliasDeclarationNodes() {
    for (Entry<String, StringInfo> entry : stringInfoMap.entrySet()) {
      StringInfo info = entry.getValue();
      if (!info.isAliased) {
        continue;
      }
      String alias = info.getVariableName(entry.getKey());
      Node var = IR.var(IR.name(alias), IR.string(entry.getKey()));
      var.useSourceInfoFromForTree(info.parentForNewVarDecl);
      if (info.siblingToInsertVarDeclBefore == null) {
        info.parentForNewVarDecl.addChildToFront(var);
      } else {
        info.parentForNewVarDecl.addChildBefore(
            var, info.siblingToInsertVarDeclBefore);
      }
      compiler.reportChangeToEnclosingScope(var);
    }
  }
953444
public void addSection(String section, Composite composite)
    {
        sections.put(section,composite);
        add(composite);
    }
1027163
public void add(byte b, Collection c) {
		if ((c != null) && (c.size() > 0)) {
			String s2 = get(b);
            for (Object aC : c) {
                String s = (String) aC;
                if (s2 == null)
                    s2 = s;
                else
                    s2 += lineSeparator + s;
            }
			set(b, s2);
		}
	}