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

Method testPNorm

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

Test of pNorm method, of class SparseVector.

()

Source from the content-addressed store, hash-verified

547 * Test of pNorm method, of class SparseVector.
548 */
549 @Test
550 public void testPNorm()
551 {
552 System.out.println("pNorm");
553 assertEquals(1.90000000000000e+01, x.pNorm(1), 1e-14);
554
555 assertEquals(7.93725393319377e+00, x.pNorm(2), 1e-14);
556
557 assertEquals(5.63881425400494e+00, x.pNorm(4), 1e-14);
558
559 assertEquals(2.00000000000000e+01, y.pNorm(1), 1e-14);
560
561 assertEquals(8.00000000000000e+00, y.pNorm(2), 1e-14);
562
563 assertEquals(5.64020810264779e+00, y.pNorm(4), 1e-14);
564 }
565
566 /**
567 * Test of clone method, of class SparseVector.

Callers

nothing calls this directly

Calls 1

pNormMethod · 0.45

Tested by

no test coverage detected