Esempio n. 1
0
  @Test
  public void testNonZeroCount() {
    AVector v = Vectorz.createUniformRandomVector(5);
    v.add(1);
    assertEquals(v.length(), v.nonZeroCount());

    v.scale(0.0);
    assertEquals(0, v.nonZeroCount());
  }
Esempio n. 2
0
 @Override
 public void multiply(double factor) {
   vector.scale(factor);
 }