MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / testPNorm

Method testPNorm

JSAT/test/jsat/linear/ShiftedVecTest.java:363–372  ·  view source on GitHub ↗

Test of pNorm method, of class ShiftedVec.

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

pNormMethod · 0.95
pNormMethod · 0.45

Tested by

no test coverage detected