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


        int cycle[];
        for (i = 0; i < orders.length; ++i) {
            if (structuresOfIndices[i + 1].size() != 0 && orders[i] >= 2) {
                //adding symmetries for indices from each slot
                cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), 2);
                aggregator.addAll(mapping[j]);
                aggregator.addAll(mapping[j + 1]);
                symmetries.addSymmetry(
                        Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));

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

        for (i = 0; i < orders.length; ++i) {
            if (structuresOfIndices[i + 1].size() != 0 && orders[i] >= 2) {
                //adding symmetries for indices from each slot
                cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), 2);
                aggregator.addAll(mapping[j]);
                aggregator.addAll(mapping[j + 1]);
                symmetries.addSymmetry(
                        Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));

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

                symmetries.addSymmetry(
                        Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));

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

                    cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), orders[i]);
                    symmetries.addSymmetry(
                            Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));
                }
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

                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

            IntArrayList usedIndices = new IntArrayList();
            Tensor current;
            while (it.hasNext()) {
                current = it.next();
                if (Derivative.onVarsIndicator.is(it))
                    usedIndices.addAll(TensorUtils.getAllIndicesNames(current));
            }

            //Creating int set from collected indices
            int[] usedIndicesArray = MathUtils.getSortedDistinct(usedIndices.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

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

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

                    List<Tensor> kroneckersCollected = new ArrayList<>();
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.