DenseDoubleVector extends AbstractVector { @Override public double getValue(final int index) { return this.internalVector.get(index); } DenseDoubleVector(final int numberOfDimensions);  DenseDoubleVector(final double[] data);  DenseDoubleVector(final no.uib.cipr.matrix.Vector vector);  DenseDoubleVector(final int size, final double value); @Override int length(); @Override double getValue(final int index); @Override void setValue(final int index, final double value); @Override void addConstant(final double constant); @Override void addVector(final IVector vector); @Override void subtractConstant(final double constant); @Override void subtractVector(final IVector vector); @Override void multiplyByVectorPairwise(final IVector secondVector); @Override void multiplyByConstant(final double constant); @Override void divideByVectorPairwise(final IVector secondVector); @Override void divideByConstant(final double constant); @Override double dotProduct(final IVector vector); @Override boolean isSparse(); @Override double[] asArray(); @Override void addVector(final double[] vectorAsArray); @Override void subtractVector(final double[] vectorAsArray); @Override void multiplyByVectorPairwise(final double[] vectorAsArray); @Override void divideByVectorPairwise(final double[] vectorAsArray); @Override double dotProduct(final double[] vectorAsArray); @Override IVector duplicate(); @Override void normalize(); @Override void fillRandomly(); @Override DenseDoubleVector toDenseVector(); @Override SparseDoubleVector toSparseVector(); @Override IVector kroneckerProduct(final double[] vectorAsArray);  }
@Test public void testGetValue() { double expectedValue = 2; double[] data = { 2, 2 }; IVector vector = new DenseDoubleVector(data); assertEquals(expectedValue, vector.getValue(0), DOUBLE_COMPARISON_DELTA); }