Package stallone.mc.tpt

Examples of stallone.mc.tpt.PathwayDecomposition


            IDoubleArray F = doublesNew.fromFile(arg.getArgument("pathways", 0));
            double[] Q = io.readDoubleColumn(arg.getArgument("pathways", 1), 0);
            int[] A = str.toIntArray(arg.getArgument("pathways", 2));
            int[] B = str.toIntArray(arg.getArgument("pathways", 3));

            PathwayDecomposition decomp = new PathwayDecomposition(F, Q, A, B);
            List<int[]> allPaths = new ArrayList<int[]>();
            List<Double> allFluxes = new ArrayList<Double>();
            int[] path = null;
            double totalFlux = 0;
            do
            {
                path = decomp.nextPathway();
                if (path != null)
                {
                    allPaths.add(path);
                    allFluxes.add(decomp.getCurrentFlux().doubleValue());
                    totalFlux += decomp.getCurrentFlux().doubleValue();
                }
            }
            while (path != null);

            System.out.println("path\tflux\tcum. flux\tcum. fraction");
View Full Code Here


    }

    @Test
    public void test()
    {
        PathwayDecomposition decomp = new PathwayDecomposition(F, Q.getArray(),
                                                A.getArray(), B.getArray());
        // FIXME: why is this null in the first call? did we miss a function call before this?
        int[] nextPathway = decomp.nextPathway();
        if (nextPathway != null) {
            BigDecimal computeCurrentFlux = decomp.computeCurrentFlux();
        } else
        {
            System.out.println("no more pathways");
        }
    }
View Full Code Here

TOP

Related Classes of stallone.mc.tpt.PathwayDecomposition

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.