Package cc.redberry.core.utils

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


                    if (numberOfGammas == 0 && numberOfGamma5s % 2 == 1) {
                        iterator.set(Complex.ZERO);
                        continue out;
                    }

                    positionsOfMatrices.addAll(positions);
                    if (numberOfGamma5s == 0)
                        traces.put(traceWithout5(product.select(positions), numberOfGammas));
                    else {
                        //early check
                        if (numberOfGammas == 0) {
View Full Code Here


        for (i = allForbidden.length - 1; i >= 0; --i)
            allForbidden[i] = IndicesUtils.getNameWithType(allForbidden[i]);

        IntArrayList fromL = new IntArrayList(from.length), toL = new IntArrayList(to.length);
        fromL.addAll(from);
        toL.addAll(to);

        Arrays.sort(allForbidden);
        int[] forbiddenGeneratorIndices = new int[allForbidden.length + dummyIndices.size()];
        System.arraycopy(allForbidden, 0, forbiddenGeneratorIndices, 0, allForbidden.length);
        i = allForbidden.length - 1;
View Full Code Here

                int counter = combination.length;
                for (int j = 0; j < metricInds.length; ++j)
                    if (temp[j] == 0xFFFFFFFF)
                        temp[j] = createIndex(counter++, getType(metricInds[j]), false);//lower index
                IntArrayList _result = nonMetricIndices.clone();
                _result.addAll(temp);
                Tensor renamed = ApplyIndexMapping.applyIndexMapping(st, new Mapping(indicesArray, _result.toArray()));
                //todo bottleneck
                for (Tensor existing : combinationArray)
                    if (TensorUtils.compare1(existing, renamed) != null)
                        continue combinations;
View Full Code Here

        for (i = allForbidden.length - 1; i >= 0; --i)
            allForbidden[i] = IndicesUtils.getNameWithType(allForbidden[i]);

        IntArrayList fromL = new IntArrayList(mappingSize), toL = new IntArrayList(mappingSize);
        fromL.addAll(fromNames);
        toL.addAll(toData);

        Arrays.sort(allForbidden);

        final int[] dummyIndices = TensorUtils.getAllDummyIndicesT(tensor).toArray();
        final int[] forbiddenGeneratorIndices = new int[allForbidden.length + dummyIndices.length];
View Full Code Here

        int a, b, cycle[];
        for (i = 0; i < orders.length; ++i) {
            if (orders[i] >= 2) {
                //adding symmetries for indices from each slot
                cycle = Combinatorics.createBlockCycle(structuresOfIndices[i + 1].size(), 2);
                aggregator.addAll(mapping[j]);
                aggregator.addAll(mapping[j + 1]);
                symmetries.addUnsafe(
                        new Symmetry(Combinatorics.convertPermutation(cycle, aggregator.toArray(), baseStructure.size()), false));

                if (orders[i] >= 3) {
View Full Code Here

        for (i = 0; i < orders.length; ++i) {
            if (orders[i] >= 2) {
                //adding symmetries for indices from each slot
                cycle = Combinatorics.createBlockCycle(structuresOfIndices[i + 1].size(), 2);
                aggregator.addAll(mapping[j]);
                aggregator.addAll(mapping[j + 1]);
                symmetries.addUnsafe(
                        new Symmetry(Combinatorics.convertPermutation(cycle, aggregator.toArray(), baseStructure.size()), false));

                if (orders[i] >= 3) {
                    for (k = 2; k < orders[i]; ++k)
View Full Code Here

                symmetries.addUnsafe(
                        new Symmetry(Combinatorics.convertPermutation(cycle, aggregator.toArray(), baseStructure.size()), false));

                if (orders[i] >= 3) {
                    for (k = 2; k < orders[i]; ++k)
                        aggregator.addAll(mapping[j + k]);

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

                        Indices newIndices = newArgNode.getIndices();
                        for (byte j = 0; j < TYPES_COUNT; ++j) {
                            if (oldArgIndices.size(IndexType.getType(j)) < newIndices.size(IndexType.getType(j))) {
                                if (oldArgIndices.size(IndexType.getType(j)) != 0)
                                    throw new IllegalArgumentException("Error in field arg indices.");
                                newArgIndices.addAll(newIndices.getOfType(IndexType.getType(j)).getAllIndices());
                            }
                        }
                        pntf.argumentsIndices[i] = IndicesFactory.createSimple(null, newArgIndices.toArray());
                    }
                }
View Full Code Here

        IndexMappingDirectAllowingUnmapped mappingToCollect = new IndexMappingDirectAllowingUnmapped();
        IndexMappingDirectAllowingUnmapped mappingCollectedTensor = new IndexMappingDirectAllowingUnmapped();

        //building index generator
        IntArrayList usedIndices = new IntArrayList(TensorUtils.getAllIndicesNames(split.factoredOut));
        usedIndices.addAll(factorsIndicesNames);
        usedIndices.addAll(termIndicesNames);
        IndexGenerator ig = new IndexGenerator(usedIndices.toArray());

        List<Tensor> mkCollectedList = new ArrayList<>();
View Full Code Here

        IndexMappingDirectAllowingUnmapped mappingCollectedTensor = new IndexMappingDirectAllowingUnmapped();

        //building index generator
        IntArrayList usedIndices = new IntArrayList(TensorUtils.getAllIndicesNames(split.factoredOut));
        usedIndices.addAll(factorsIndicesNames);
        usedIndices.addAll(termIndicesNames);
        IndexGenerator ig = new IndexGenerator(usedIndices.toArray());

        List<Tensor> mkCollectedList = new ArrayList<>();

        for (Map.Entry<Integer, IndexMappingBufferRecord> entry : concurentBuffer.getMap().entrySet()) {
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.