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

Method testClone

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

Test of clone method, of class SparseVector.

()

Source from the content-addressed store, hash-verified

567 * Test of clone method, of class SparseVector.
568 */
569 @Test
570 public void testClone()
571 {
572 System.out.println("clone");
573
574 SparseVector yClone = y.clone();
575 yClone.mutableSubtract(y);
576 yClone.mutableAdd(x);
577
578 assertEquals(3.90000000000000e+01, y.dot(yClone), 1e-14);
579 }
580
581 /**
582 * Test of normalize method, of class SparseVector.

Callers

nothing calls this directly

Calls 4

mutableAddMethod · 0.95
cloneMethod · 0.65
mutableSubtractMethod · 0.45
dotMethod · 0.45

Tested by

no test coverage detected