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

Method testDot

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

Test of dot method, of class SparseVector.

()

Source from the content-addressed store, hash-verified

325 * Test of dot method, of class SparseVector.
326 */
327 @Test
328 public void testDot()
329 {
330 System.out.println("dot");
331 assertEquals(6.30000000000000e+01, x.dot(x), 1e-14);
332
333 assertEquals(6.40000000000000e+01, y.dot(y), 1e-14);
334
335 assertEquals(3.90000000000000e+01, y.dot(x), 1e-14);
336 assertEquals(3.90000000000000e+01, x.dot(y), 1e-14);
337 }
338
339 /**
340 * Test of multiply method, of class SparseVector.

Callers

nothing calls this directly

Calls 1

dotMethod · 0.45

Tested by

no test coverage detected