Package cc.redberry.core.utils

Examples of cc.redberry.core.utils.IntArrayList.clear()


        public SeedPlanter() {
            int[][] hits = new int[seeds.length][];
            IntArrayList hitList = new IntArrayList();
            for (int seedIndex = 0; seedIndex < seeds.length; ++seedIndex) {
                hitList.clear();
                for (int i = 0; i < targetData.length; ++i)
                    if (weakMatch(fromData[seeds[seedIndex]], targetData[i])
                            && GraphUtils.componentSize(seeds[seedIndex], fromFContractions.components)
                            <= GraphUtils.componentSize(i, targetFContractions.components))
                        hitList.add(i);
View Full Code Here


                    cycle = Combinatorics.createBlockCycle(structuresOfIndices[i + 1].size(), orders[i]);
                    symmetries.addUnsafe(
                            new Symmetry(Combinatorics.convertPermutation(cycle, aggregator.toArray(), baseStructure.size()), false));
                }
                aggregator.clear();
            }
            j += orders[i];
        }
    }
View Full Code Here

        ArrayList<Tensor> kroneckers = new ArrayList<>();
        int j, index, newIndex;
        IndexGeneratorImpl generator = new IndexGeneratorImpl(TensorUtils.getAllIndicesNamesT(tensor).toArray());
        for (int i = 0; i < factors.length; ++i) {
            from.clear();
            to.clear();
            currentFactorIndices = IndicesFactory.createSimple(null, factors[i].getIndices());

            for (j = currentFactorIndices.size() - 1; j >= 0; --j) {
                index = currentFactorIndices.get(j);
                if (freeIndices.contains(getNameWithType(index))) {
View Full Code Here

        ArrayList<Tensor> kroneckers = new ArrayList<>();
        int j, index, newIndex;
        IndexGeneratorImpl generator = new IndexGeneratorImpl(TensorUtils.getAllIndicesNamesT(tensor).toArray());
        for (int i = 0; i < factors.length; ++i) {
            from.clear();
            to.clear();
            currentFactorIndices = IndicesFactory.createSimple(null, factors[i].getIndices());

            for (j = currentFactorIndices.size() - 1; j >= 0; --j) {
                index = currentFactorIndices.get(j);
                if (freeIndices.contains(getNameWithType(index))) {
View Full Code Here

        public SeedPlanter() {
            int[][] hits = new int[seeds.length][];
            IntArrayList hitList = new IntArrayList();
            for (int seedIndex = 0; seedIndex < seeds.length; ++seedIndex) {
                hitList.clear();
                for (int i = 0; i < targetData.length; ++i)
                    if (weakMatch(fromData[seeds[seedIndex]], targetData[i])
                            && GraphUtils.componentSize(seeds[seedIndex], fromFContractions.components)
                            <= GraphUtils.componentSize(i, targetFContractions.components))
                        hitList.add(i);
View Full Code Here

                    cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), orders[i]);
                    symmetries.addSymmetry(
                            Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));
                }
                aggregator.clear();
            }
            j += orders[i];
        }
    }
View Full Code Here

            ArrayList<Tensor> kroneckers = new ArrayList<>();
            int j, index, newIndex;
            IndexGenerator generator = new IndexGenerator(TensorUtils.getAllIndicesNamesT(tensor).toArray());
            for (int i = 0; i < factors.length; ++i) {
                from.clear();
                to.clear();
                currentFactorIndices = factors[i].getIndices();

                for (j = currentFactorIndices.size() - 1; j >= 0; --j) {
                    index = currentFactorIndices.get(j);
                    if (freeIndices.contains(getNameWithType(index))) {
View Full Code Here

        public SeedPlanter() {
            int[][] hits = new int[seeds.length][];
            IntArrayList hitList = new IntArrayList();
            for (int seedIndex = 0; seedIndex < seeds.length; ++seedIndex) {
                hitList.clear();
                for (int i = 0; i < targetData.length; ++i)
                    if (weakMatch(fromData[seeds[seedIndex]], targetData[i])
                            && GraphUtils.componentSize(seeds[seedIndex], fromFContractions.components) >= GraphUtils.componentSize(i, targetFContractions.components))
                        hitList.add(i);
                hits[seedIndex] = hitList.toArray();
View Full Code Here

        ArrayList<Tensor> kroneckers = new ArrayList<>();
        int j, index, newIndex;
        IndexGenerator generator = new IndexGenerator(TensorUtils.getAllIndicesNamesT(tensor).toArray());
        for (int i = 0; i < factors.length; ++i) {
            from.clear();
            to.clear();
            currentFactorIndices = IndicesFactory.createSimple(null, factors[i].getIndices());

            for (j = currentFactorIndices.size() - 1; j >= 0; --j) {
                index = currentFactorIndices.get(j);
                if (freeIndices.contains(getNameWithType(index))) {
View Full Code Here

        public SeedPlanter() {
            int[][] hits = new int[seeds.length][];
            IntArrayList hitList = new IntArrayList();
            for (int seedIndex = 0; seedIndex < seeds.length; ++seedIndex) {
                hitList.clear();
                for (int i = 0; i < targetData.length; ++i)
                    if (weakMatch(fromData[seeds[seedIndex]], targetData[i])
                            && GraphUtils.componentSize(seeds[seedIndex], fromFContractions.components) >= GraphUtils.componentSize(i, targetFContractions.components))
                        hitList.add(i);
                hits[seedIndex] = hitList.toArray();
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.