Package stallone.api.doubles

Examples of stallone.api.doubles.IDoubleIterator


    @Override
    public IDoubleIterator iterator()
    {
        IDoubleArray sum = Algebra.util.add(prior, obs);
        IDoubleIterator itElements = sum.iterator();
        return(new PosteriorCountMatrixIterator(this, itElements));
    }
View Full Code Here


    @Override
    public IDoubleIterator nonzeroIterator()
    {
        IDoubleArray sum = Algebra.util.add(prior, obs);
        IDoubleIterator itElements = sum.nonzeroIterator();
        return(new PosteriorCountMatrixIterator(this, itElements));
    }
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.IDoubleIterator

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.