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

Method testPNormDist

JSAT/test/jsat/linear/SparseVectorTest.java:524–544  ·  view source on GitHub ↗

Test of pNormDist method, of class SparseVector.

()

Source from the content-addressed store, hash-verified

522 * Test of pNormDist method, of class SparseVector.
523 */
524 @Test
525 public void testPNormDist()
526 {
527 System.out.println("pNormDist");
528 assertEquals(1.70000000000000e+01, x.pNormDist(1, y), 1e-14);
529
530 assertEquals(7.00000000000000e+00, x.pNormDist(2, y), 1e-14);
531
532 assertEquals(5.24534393385174e+00, x.pNormDist(4, y), 1e-14);
533
534 assertEquals(1.70000000000000e+01, y.pNormDist(1, x), 1e-14);
535
536 assertEquals(7.00000000000000e+00, y.pNormDist(2, x), 1e-14);
537
538 assertEquals(5.24534393385174e+00, y.pNormDist(4, x), 1e-14);
539
540
541 assertEquals(0, x.pNormDist(4, x), 1e-14);
542
543 assertEquals(0, y.pNormDist(1, y), 1e-14);
544 }
545
546 /**
547 * Test of pNorm method, of class SparseVector.

Callers

nothing calls this directly

Calls 1

pNormDistMethod · 0.45

Tested by

no test coverage detected