Sets the value of the entry corresponding to the given indices.
@param indices The indices of the multi-dimensional array.
@param val The value to set.
@return The previous value.
334066
public double set(int[] indices, double val) {
        checkIndices(indices);
        int c = getConfigIdx(indices);
        return values.set(c, val);
    }
565473
public static void set(final int[][] array, final long index, int value)
    {
        array[segment(index)][displacement(index)] = value;
    }
150593
@NonNull
    @Override
    public MutableArray setArray(int index, Array value) {
        return setValue(index, value);
    }
798283
public void setValue(int index, int value) throws IOException {
        if (index >= structure.valueSizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        Bytes.putInt(this.value, structure.valueByteOffsets.get(index), value);
    }
814502
public void addValue(int idx, double val) {
        values[idx] = s.plus(values[idx], val); 
    }
1120349
public void setPrimitive(int index, int value) {
        int pos = Arrays.binarySearch(indices, index);

        if (value != 0) {
            // need to make room in the indices array
            if (pos < 0) {
                int newPos = 0 - (pos + 1);
                int[] newIndices = new int[indices.length + 1];
                int[] newValues = new int[values.length + 1];
            
                // copy the existing array contents that are valid in their
                // current positions
                for (int i = 0; i < newPos; ++i) {
                    newValues[i] = values[i];
                    newIndices[i] = indices[i];
                }

                // shift the elements down by one to make room
                for (int i = newPos; i < values.length; ++i) {
                    newValues[i+1] = values[i];
                    newIndices[i+1] = indices[i];
                }
                    
                // swap the arrays
                indices = newIndices;
                values = newValues;
                pos = newPos;
                    
                 // update the position of the pos in the values array
                indices[pos] = index;
            }
            values[pos] = value;
        }
        // The value is zero but previously held a spot in the matrix, so
        // remove its position and shift everything over
        else if (value == 0 && pos >= 0) {
            int newLength = indices.length - 1;
            int[] newIndices = new int[newLength];
            int[] newValues = new int[newLength];
            for (int i = 0, j = 0; i < indices.length; ++i) {
                if (i != pos) {
                    newIndices[j] = indices[i];
                    newValues[j] = values[i];            
                    j++;
                }
            }

            // swap the arrays
            indices = newIndices;
            values = newValues;
        }

    }
742062
public void put(NumberVector val) {
    assert (val.getDimensionality() == elements.length);
    wsum += 1.0;
    for(int i = 0; i < elements.length; i++) {
      final double delta = val.doubleValue(i) - elements[i];
      elements[i] += delta / wsum;
    }
  }
542458
public void setValue (int index, String value)
    {
    if (index >= 0 && index < length) {
        data[index*5+4] = value;
    } else {
        badIndex(index);
    }
    }
104924
public void addNextValue(Object val) {
    long newVal = Long.parseLong(val.toString());
    if (this.maxVal < newVal) {
      this.maxVal = newVal;
    }
  }
1079512
public void setActiveIndices(final int[] indices) {
		TabSetModel model = getOrCreateComponentModel();

		if (indices == null || indices.length == 0) {
			model.activeTabs = null;
			return;
		}

		if (model.activeTabs == null) {
			model.activeTabs = new ArrayList<>(1);
		}

		model.activeTabs.clear();

		for (int index : indices) {
			model.activeTabs.add(index);
		}
	}
170672
@SuppressWarnings("unchecked")
    public static List<Long> getAt(long[] array, Collection indices) {
        return primitiveArrayGet(array, indices);
    }
1364433
public void setArrayValues(java.util.Collection<Value> arrayValues) {
        if (arrayValues == null) {
            this.arrayValues = null;
            return;
        }

        this.arrayValues = new java.util.ArrayList<Value>(arrayValues);
    }
321823
public void setValueAt( int index, double value ) {

        int row = index / data[0].length;
        int col = index % data[0].length;

        data[row][col] = value;
    }
397086
public void set(int index, float value)
    {
        if (index < offset + array.length && index >= offset)
        {
            array[index - offset] += value;
        }
        else if (index < offset)
        {  //expand from left
            int gap = offset - index;
            int newSize = gap + array.length;
            float[] newArray = new float[newSize];
            newArray[0] = value;
            for (int i = 0; i < array.length; i++)
            {
                newArray[gap + i] = array[i];
            }
            this.offset = index;
            this.array = newArray;
        }
        else
        {
            int gap = index - (array.length + offset - 1);
            int newSize = array.length + gap;
            float[] newArray = new float[newSize];
            newArray[newSize - 1] = value;
            for (int i = 0; i < array.length; i++)
            {
                newArray[i] = array[i];
            }
            this.array = newArray;
        }
    }
802672
public Mean put(double[] vals, double[] weights) {
    assert (vals.length == weights.length);
    for(int i = 0, end = vals.length; i < end; i++) {
      put(vals[i], weights[i]);
    }
    return this;
  }
234037
public void set(long index, T value)
    {
        array[segment(index)][offset(index)] = value;
    }
722064
@Override
  public Float set(int index, Float element) {
    return set(index, element.floatValue());
  }