@Test public void testAddToValue() { array5Vector.addToValue(2, 5.0); assertEquals(5, array5Vector.getArrayRef()[2], 0.0); emptyVector.addToValue(0, 1.0); assertEquals(1, emptyVector.getArrayRef()[0], 0.0); }
public void addToValue(int index, double value) { if (index >= doubleArray.length) { this.doubleArray = Doubles.ensureCapacity(this.doubleArray, index + 1, 0); } this.doubleArray[index] += value; }
DoubleVector implements java.io.Serializable { public void addToValue(int index, double value) { if (index >= doubleArray.length) { this.doubleArray = Doubles.ensureCapacity(this.doubleArray, index + 1, 0); } this.doubleArray[index] += value; } }
DoubleVector implements java.io.Serializable { public void addToValue(int index, double value) { if (index >= doubleArray.length) { this.doubleArray = Doubles.ensureCapacity(this.doubleArray, index + 1, 0); } this.doubleArray[index] += value; } DoubleVector();  DoubleVector(double[] toCopy);  DoubleVector(DoubleVector toCopy); }
DoubleVector implements java.io.Serializable { public void addToValue(int index, double value) { if (index >= doubleArray.length) { this.doubleArray = Doubles.ensureCapacity(this.doubleArray, index + 1, 0); } this.doubleArray[index] += value; } DoubleVector();  DoubleVector(double[] toCopy);  DoubleVector(DoubleVector toCopy); double[] getArrayRef(); double[] getArrayCopy(); int numNonZeroEntries(); void setValue(int index, double value); void addToValue(int index, double value); double sumOfValues(); void getSingleLineDescription(StringBuilder out); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
DoubleVector implements java.io.Serializable { public void addToValue(int index, double value) { if (index >= doubleArray.length) { this.doubleArray = Doubles.ensureCapacity(this.doubleArray, index + 1, 0); } this.doubleArray[index] += value; } DoubleVector();  DoubleVector(double[] toCopy);  DoubleVector(DoubleVector toCopy); double[] getArrayRef(); double[] getArrayCopy(); int numNonZeroEntries(); void setValue(int index, double value); void addToValue(int index, double value); double sumOfValues(); void getSingleLineDescription(StringBuilder out); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }