| 32 | } |
| 33 | |
| 34 | @Before |
| 35 | public void setUp() |
| 36 | { |
| 37 | Random rand = new Random(546); |
| 38 | x = DenseVector.random(20, rand); |
| 39 | xNrmd = new VecWithNorm(x.clone()); |
| 40 | |
| 41 | a = new SparseVector(x.length()); |
| 42 | b = new SparseVector(x.length()); |
| 43 | c = new SparseVector(x.length()); |
| 44 | |
| 45 | for(int i = 0; i < 5; i++) |
| 46 | { |
| 47 | a.set(rand.nextInt(a.length()), rand.nextGaussian()); |
| 48 | b.set(rand.nextInt(b.length()), rand.nextGaussian()); |
| 49 | c.set(rand.nextInt(c.length()), rand.nextGaussian()); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | @After |
| 54 | public void tearDown() |