}
@Test
public void testVectorAdd() {
// The default value should be 0
LongDenseVector vec1 = new LongDenseVector(10);
assertEquals(0, vec1.get(0));
// Basic get/set
vec1.set(0, 1);
vec1.set(6, 14);
assertEquals(1, vec1.get(0));
assertEquals(0, vec1.get(4));
assertEquals(14, vec1.get(6));
assertEquals(0, vec1.get(15));
// Add another vector
LongDenseVector vec2 = new LongDenseVector(20);
vec2.set(0, 5);
vec2.set(5, 17);
vec1.add(vec2);
assertEquals(6, vec1.get(0));
assertEquals(17, vec1.get(5));
assertEquals(14, vec1.get(6));