Package cc.redberry.transformation.substitutions.n

Examples of cc.redberry.transformation.substitutions.n.ProductsBijectionsPort$SeedPlanter


            CC.resetTensorNames();
            Product from = rp.next();
            Product target = from.clone();

            long start = System.nanoTime();
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());

            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null) {
                for (int i = 0; i < bijection.length; ++i)
                    if (bijection[i] != i)
                        continue OUTER;
                good = true;
                break;
View Full Code Here


//                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge6");
            if (count == 24)
                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge24");
            if (count == 30)
                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge30");
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());

//            List<int[]> bijections = new ArrayList<>();
            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null)
//                System.out.println(Arrays.toString(bijection));
//                bijections.add(bijection.clone());
                if (IndexMappings.createBijectiveProductPort(dataFrom, dataTo(dataTarget, bijection), false).take() != null) {
                    good = true;
                    System.out.println(count + "  " + trys);
View Full Code Here

            CC.resetTensorNames();
            Product from = rp.next();
            Product target = from.clone();

            long start = System.nanoTime();
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());
            Tensor[] dataFrom = from.getContent().getDataCopy();
            Tensor[] dataTarget = target.getContent().getDataCopy();
//            List<int[]> bijections = new ArrayList<>();
            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null) {
//                bijections.add(bijection.clone());
                if (IndexMappings.createBijectiveProductPort(dataFrom, dataTo(dataTarget, bijection), false).take() != null) {
                    good = true;
                    break;
                }
View Full Code Here

            CC.resetTensorNames();
            Product from = rp.nextProduct(15);
            Product target = from.clone();

            long start = System.nanoTime();
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());

            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null) {
                for (int i = 0; i < bijection.length; ++i)
                    if (bijection[i] != i)
                        continue OUTER;
                good = true;
                break;
View Full Code Here

//                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge6");
            if (count == 24)
                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge24");
            if (count == 30)
                ContractionsGraphDrawer.drawToPngFile(from, "/home/stas/Projects/Durty/", "Huge30");
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());

//            List<int[]> bijections = new ArrayList<>();
            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null)
//                System.out.println(Arrays.toString(bijection));
//                bijections.add(bijection.clone());
                if (IndexMappings.createBijectiveProductPort(dataFrom, dataTo(dataTarget, bijection), false).take() != null) {
                    good = true;
                    System.out.println(count + "  " + trys);
View Full Code Here

//            }

            System.out.println(from.size());

            long start = System.nanoTime();
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());

            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while ((bijection = port.take()) != null && trys++ < 5000);
            if (trys != 0)
                good = true;
            double millis = 1E-6 * (System.nanoTime() - start);
            timeStats.addValue(millis);
            trysStats.addValue(trys);
View Full Code Here

            CC.resetTensorNames();
            Product from = rp.nextProduct(15);
            Product target = from.clone();

            long start = System.nanoTime();
            ProductsBijectionsPort port = new ProductsBijectionsPort(from.getContent(), target.getContent());
            Tensor[] dataFrom = from.getContent().getDataCopy();
            Tensor[] dataTarget = target.getContent().getDataCopy();
//            List<int[]> bijections = new ArrayList<>();
            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null)
//                bijections.add(bijection.clone());
                if (IndexMappings.createBijectiveProductPort(dataFrom, dataTo(dataTarget, bijection), false).take() != null) {
                    good = true;
                    break;
                }
View Full Code Here

TOP

Related Classes of cc.redberry.transformation.substitutions.n.ProductsBijectionsPort$SeedPlanter

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.