Package ch.akuhn.hapax.linalg

Examples of ch.akuhn.hapax.linalg.SparseVector.used()


    @Test
    public SparseVector empty() {
        SparseVector v = new SparseVector(10, 3);
        assertEquals(10, v.size());
        assertEquals(0, v.used());
        assertEquals(0, v.get(0), Double.MIN_VALUE);
        assertEquals(0, v.get(1), Double.MIN_VALUE);
        assertEquals(0, v.get(2), Double.MIN_VALUE);
        assertEquals(0, v.get(3), Double.MIN_VALUE);
        assertEquals(0, v.get(4), Double.MIN_VALUE);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.