AbstractVector implements Vector { @Override public Vector set(int idx, double val) { checkIndex(idx); storageSet(idx, val); return this; } AbstractVector(VectorStorage sto);  AbstractVector(boolean readOnly, VectorStorage sto);  AbstractVector(); @Override int size(); @Override double get(int idx); @Override double getX(int idx); @Override T getRaw(int idx); @Override T getRawX(int idx); @Override boolean isArrayBased(); @Override Vector sort(); @Override Vector map(IgniteDoubleFunction<Double> fun); @Override Vector map(Vector vec, IgniteBiFunction<Double, Double, Double> fun); @Override Vector map(IgniteBiFunction<Double, Double, Double> fun, double y); @Override Element minElement(); @Override Element maxElement(); @Override double minValue(); @Override double maxValue(); @Override Vector set(int idx, double val); @Override Vector setX(int idx, double val); @Override Vector setRaw(int idx, Serializable val); @Override Vector setRawX(int idx, Serializable val); @Override Vector increment(int idx, double val); @Override Vector incrementX(int idx, double val); @Override double sum(); @Override IgniteUuid guid(); @Override Iterable<Element> all(); @Override int nonZeroElements(); @Override T foldMap(IgniteBiFunction<T, Double, T> foldFun, IgniteDoubleFunction<Double> mapFun,
        T zeroVal); @Override T foldMap(Vector vec, IgniteBiFunction<T, Double, T> foldFun,
        IgniteBiFunction<Double, Double, Double> combFun, T zeroVal); @Override Iterable<Element> nonZeroes(); @Override Map<String, Object> getMetaStorage(); @Override Vector assign(double val); @Override Vector assign(double[] vals); @Override Vector assign(Vector vec); @Override Vector assign(IntToDoubleFunction fun); @Override Spliterator<Double> allSpliterator(); @Override Spliterator<Double> nonZeroSpliterator(); @Override double dot(Vector vec); @Override double getLengthSquared(); @Override boolean isDense(); @Override boolean isDistributed(); @Override boolean isNumeric(); @Override VectorStorage getStorage(); @Override Vector viewPart(int off, int len); @Override Matrix cross(Vector vec); @Override Matrix toMatrix(boolean rowLike); @Override Matrix toMatrixPlusOne(boolean rowLike, double zeroVal); @Override double getDistanceSquared(Vector vec); @Override Vector minus(Vector vec); @Override Vector plus(double x); @Override Vector divide(double x); @Override Vector times(double x); @Override Vector times(Vector vec); @Override Vector plus(Vector vec); @Override Vector logNormalize(); @Override Vector logNormalize(double power); @Override double kNorm(double power); @Override Vector normalize(); @Override Vector normalize(double power); @Override Vector copy(); @Override Vector copyOfRange(int from, int to); @Override Element getElement(int idx); @Override void writeExternal(ObjectOutput out); @SuppressWarnings("unchecked") @Override void readExternal(ObjectInput in); @Override void destroy(); @Override int hashCode(); @Override boolean equals(Object obj); @Override void compute(int idx, IgniteIntDoubleToDoubleBiFunction f);  }
@Test public void set() { double[] data = initVector(); for (int i = 0; i < MathTestConstants.STORAGE_SIZE; i++) testVector.set(i, Math.exp(data[i])); for (int i = 0; i < MathTestConstants.STORAGE_SIZE; i++) assertEquals(MathTestConstants.VAL_NOT_EQUALS, testVector.get(i), Math.exp(data[i]), MathTestConstants.NIL_DELTA); }
@Test(expected = IndexException.class) public void setNegative0() { testVector.set(-1, -1); }
@Test(expected = IndexException.class) public void setNegative1() { initVector(); testVector.set(-1, -1); }
@Test(expected = IndexException.class) public void setNegative2() { initVector(); testVector.set(MathTestConstants.STORAGE_SIZE + 1, -1); }