Package stallone.api.doubles

Examples of stallone.api.doubles.IDoubleElement


        v.set(0, 5);
        v.set(5, 2);
       
        for (IDoubleIterator it = v.nonzeroIterator(); it.hasNext();)
        {
            IDoubleElement de = it.next();
            System.out.println(de.index()+" "+de.row()+" "+de.column()+" "+de.get());
        }
    }
View Full Code Here


        for (int i=0; i<data.length; i++)
            M.set(data[i][0], data[i][1], data[i][2]);
       
        IDoubleIterator it = M.nonzeroIterator();
        IDoubleElement de = null;
       
        for (int i=0; i<data.length; i++)
        {
            Assert.assertEquals(it.hasNext(), true);
            de = it.next();
            Assert.assertEquals(de.row(), data[i][0]);
            Assert.assertEquals(de.column(), data[i][1]);
            Assert.assertEquals((int)de.get(), data[i][2]);
        }
        Assert.assertEquals(it.hasNext(), false);
       
    }
View Full Code Here

TOP

Related Classes of stallone.api.doubles.IDoubleElement

Copyright © 2018 www.massapicom. 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.