Package cc.redberry.core.combinatorics

Examples of cc.redberry.core.combinatorics.PriorityPermutationGenerator


        private final PriorityPermutationGenerator permutationGenerator;

        public StretchPairTester(final Tensor[] from, final Tensor[] to) {
            this.from = from;
            this.to = to;
            this.permutationGenerator = new PriorityPermutationGenerator(from.length);
        }
View Full Code Here


        }

        @Override
        public boolean test(final IndexMappingBufferTester tester) {
            int[] permutation;
            final PriorityPermutationGenerator generator = permutationGenerator;
            generator.reset();
            int i;
            OUTER:
            while ((permutation = generator.next()) != null)
                for (i = 0; i < from.length; ++i) {
                    if (!ProviderSum.test(from[i], to[permutation[i]], tester))
                        continue OUTER;
                    generator.nice();
                    return true;
                }
            return false;
        }
View Full Code Here

        private final PriorityPermutationGenerator permutationGenerator;

        public StretchPairTester(final Tensor[] from, final Tensor[] to) {
            this.from = from;
            this.to = to;
            this.permutationGenerator = new PriorityPermutationGenerator(from.length);
        }
View Full Code Here

        }

        @Override
        public boolean test(final IndexMappingBufferTester tester) {
            int[] permutation;
            final PriorityPermutationGenerator generator = permutationGenerator;
            generator.reset();
            int i;
            OUTER:
            while ((permutation = generator.next()) != null)
                for (i = 0; i < from.length; ++i) {
                    if (!ProviderSum.test(from[i], to[permutation[i]], tester))
                        continue OUTER;
                    generator.nice();
                    return true;
                }
            return false;
        }
View Full Code Here

TOP

Related Classes of cc.redberry.core.combinatorics.PriorityPermutationGenerator

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.