Package stallone.api.doubles

Examples of stallone.api.doubles.IDoubleArray.columns()


        if (pi == null)
            pi = StationaryDistribution.calculate(T);

        IDoubleArray U = Doubles.create.array(notAB.size(),notAB.size());
  for (int i=0; i<U.rows(); i++)
      for (int j=0; j<U.columns(); j++)
    U.set(i,j, pi.get(notAB.get(j)) * K.get(notAB.get(j),notAB.get(i)) / pi.get(notAB.get(i)));

        IDoubleArray v = Doubles.create.array(notAB.size());
        for (int i=0; i<v.size(); i++)
            for (int k=0; k<A.size(); k++)
View Full Code Here


            // net flux
            IDoubleArray Fnet = doublesNew.matrix(I.length, I.length);
            for (int i = 0; i < Fnet.rows(); i++)
            {
                Fnet.set(i, i, 0);
                for (int j = i + 1; j < Fnet.columns(); j++)
                {
                    if (F.get(i, j) > F.get(j, i))
                    {
                        Fnet.set(i, j, F.get(i, j) - F.get(j, i));
                    }
View Full Code Here

            return false;

        if (oo.rows() != rows())
            return false;

        if (oo.columns() != columns())
            return false;

        for (int i = 0; i < oo.size(); i++)
        {
            if (oo.get(i) != this.get(i))
View Full Code Here

            evec = evd.getRightEigenvectorMatrix();
            evec = evec.viewBlock(0,0,M.rows(),nstates);
        }
        else
        {
            if (evec.columns() < nstates)
                throw(new IllegalArgumentException("Attempting to create PCCA decomposition into "+nstates+" states."+
                                                    "but only "+evec.columns()+" eigenvectors were provided"));
        }

        pcca.setEigenvectors(evec);
View Full Code Here

        }
        else
        {
            if (evec.columns() < nstates)
                throw(new IllegalArgumentException("Attempting to create PCCA decomposition into "+nstates+" states."+
                                                    "but only "+evec.columns()+" eigenvectors were provided"));
        }

        pcca.setEigenvectors(evec);
        pcca.perform();
View Full Code Here

            IDoubleArray timescales = msm.timescales(TC, tau);
            IDoubleArray pibig = doublesNew.fromFile(cmd.inDir + "/hmm-pibig-lag" + tau + ".dat");
            IDoubleArray Rbig = doublesNew.fromFile(cmd.inDir + "/hmm-Rbig-lag" + tau + ".dat");

            System.out.print(tau + "\t");
            for (int i = 1; i < Rbig.columns(); i++)
            {
                IDoubleArray ri = Rbig.viewColumn(i);

                double max = 0;
                int argmax = i;
View Full Code Here

            }

        // target rows
        for (int i=0; i<target.size(); i++)
            {
                for (int j=0; j<A.columns(); j++)
                    {
                        A.set(target.get(i), j, 0);
                    }
                A.set(target.get(i), target.get(i), 1);
            }
View Full Code Here

                A.set(target.get(i), target.get(i), 1);
            }

        // identify 0-columns
        IIntList zeros = Ints.create.list(0);
        for (int j=0; j<A.columns(); j++)
            {
                boolean colzero = true;
                for (int i=0; i<A.rows(); i++)
                    if (A.get(i,j) != 0)
                        colzero = false;
View Full Code Here

                        colzero = false;
                if (colzero)
                    zeros.append(j);
            }

        for (int j=0; j<A.columns(); j++)
            {
                if (!Ints.util.contains(target, j) && A.get(j,j) == 0)
                    zeros.append(j);
            }
View Full Code Here

        IDoubleArray P = prop.propagate(t);

        double res = 0;
        for (int i=0; i<P.rows(); i++)
        {
            for (int j=0; j<P.columns(); j++)
            {
                res += p0.get(i) * P.get(i,j) * a.get(j);
            }
        }

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.