Package stallone.api.doubles

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


        calculateComponents();

        for (int c=0; c<components.size(); c++)
        {
            IDoubleArray Tsub = T.view(components.get(c).getArray(),components.get(c).getArray()).copy();
            for (int i=0; i<Tsub.rows(); i++)
            {
                IDoubleArray row = Tsub.viewRow(i);
                Algebra.util.scale(1.0/Doubles.util.sum(row), row);
            }
View Full Code Here


       
        // subtract mean
        IDoubleArray x = alg.subtract(in, moments.getMean());
       
        // make a row
        if (x.rows() > 1)
            x = alg.transposeToNew(x);
       
        IDoubleArray y = alg.product(x, evec);
        int d = Math.min(in.size(),out.size());
        for (int i=0; i<d; i++)
View Full Code Here

        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++)
View Full Code Here

        // subtract mean
        IDoubleArray x = alg.subtract(in, moments.getMean());
       
        // make a row
        if (x.rows() > 1)
            x = alg.transposeToNew(x);
       
        IDoubleArray y = alg.product(x, evecTICA);
        int d = Math.min(in.size(),out.size());
        for (int i=0; i<d; i++)
View Full Code Here

            doubles.writeMatrixSparse(C, System.out);
        }
        if (arg.hasCommand("populousSet"))
        {
            IDoubleArray C = doublesNew.fromFile(arg.getArgument("populousSet", 0));
            int n = C.rows();
            double minCount = arg.getIntArgument("populousSet",1);
            double minIn = arg.getIntArgument("populousSet",2);
            double minOut = arg.getIntArgument("populousSet",3);

            IDoubleArray counts = alg.rowSums(C);
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))
View Full Code Here

        IDoubleArray oo = (IDoubleArray) o;

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

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

        if (oo.columns() != columns())
            return false;
View Full Code Here

            if (arg.hasCommand("left"))
                alg.transpose(T);
            int n = arg.getIntArgument("eigenvectors", 1);

            IDoubleArray EV = alg.evd(T).R();
            EV = EV.viewBlock(0, EV.rows(), 0, n);
            doubles.print(EV, " ", "\n");
        }

    }
}
View Full Code Here

    private void initX()
    {
        // initial T(tau)
        IDoubleArray T = C.copy();
        for (int i = 0; i < T.rows(); i++)
        {
            IDoubleArray r = T.viewRow(i);
            Algebra.util.scale(Doubles.util.sum(r), r);
            /*double s = DoubleArrays.sum(T[i]);
            for (int j = 0; j < T.length; j++)
View Full Code Here

    public void calculate()
    {
        IDoubleArray A = T.copy();

        // nontarget rows
        for (int i=0; i<A.rows(); i++)
            {
                A.set(i, i, T.get(i,i)-1);
            }

        // target rows
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.