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

Method testZeroOut

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

Test of zeroOut method, of class ShiftedVec.

()

Source from the content-addressed store, hash-verified

346 * Test of zeroOut method, of class ShiftedVec.
347 */
348 @Test
349 public void testZeroOut()
350 {
351 System.out.println("zeroOut");
352 ShiftedVec a = new ShiftedVec(a_base, shift_a);
353 a.zeroOut();
354
355 for(int i = 0; i < a.length(); i++)
356 assertEquals(0.0, a.get(i), 0.0);
357 assertEquals(0.0, a.getShift(), 0.0);
358 }
359
360 /**
361 * Test of pNorm method, of class ShiftedVec.

Callers

nothing calls this directly

Calls 4

zeroOutMethod · 0.95
lengthMethod · 0.95
getMethod · 0.95
getShiftMethod · 0.95

Tested by

no test coverage detected