Test of pNorm method, of class ShiftedVec.
()
| 361 | * Test of pNorm method, of class ShiftedVec. |
| 362 | */ |
| 363 | @Test |
| 364 | public void testPNorm() |
| 365 | { |
| 366 | System.out.println("pNorm"); |
| 367 | ShiftedVec a = new ShiftedVec(a_base, shift_a); |
| 368 | double[] ps = {0.5, 1, 2, 2.5, 3, 10 }; |
| 369 | |
| 370 | for(double p : ps) |
| 371 | assertEquals(a_dense.pNorm(p), a.pNorm(p), 1e-10); |
| 372 | } |
| 373 | |
| 374 | /** |
| 375 | * Test of mean method, of class ShiftedVec. |