ArrayFeatureVector extends FeatureVector { public double get(int index) { if (index < features.size()) return features.get(index); else return 0.0; } ArrayFeatureVector(); double get(int index); java.util.Iterator<Entry> iterator(); void set(int index, double value); double[] toArray();  }
@Test public void testGet() { assertEquals(fv2.get(0), 0, 0.0); assertEquals(fv2.get(1), 4.5, delta); assertEquals(fv2.get(2), 0, 0.0); assertEquals(fv2.get(3), 0, 0.0); assertEquals(fv2.get(4), 0, 0.0); assertEquals(fv2.get(5), 7.1, delta); assertEquals(fv2.get(6), 13, delta); assertEquals(fv2.get(7), 0, 0.0); assertEquals(fv2.get(8), 0, 0.0); assertEquals(fv2.get(9), 0, 0.0); assertEquals(fv2.get(10), 2.3, delta); assertEquals(fv2.get(11), 0, 0.0); }