@Test
public void testScal() throws Exception {

    DenseVector v1 = dv1.clone();
    BLAS.scal(0.5, v1);
    Assert.assertArrayEquals(v1.getData(), new double[]{0.5, 1.0}, TOL);
    SparseVector v2 = spv1.clone();
    BLAS.scal(0.5, v2);
    Assert.assertArrayEquals(v2.getIndices(), spv1.getIndices());
    Assert.assertArrayEquals(v2.getValues(), new double[]{0.5, 1.0}, TOL);
}