Package cc.redberry.core.indexmapping

Examples of cc.redberry.core.indexmapping.MappingsPort


            Tensor riman1 = Tensors.parse(e0);
            Tensor riman2 = Tensors.parse(e1);

            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000; ++i) {
                MappingsPort mp = IndexMappings.createPort(riman1, riman2);
                IndexMappingBuffer buffera;
                while ((buffera = mp.take()) != null);
            }
            time += System.currentTimeMillis() - start;
        }
        return time;
    }
View Full Code Here


            if (epsComponent.isEmpty())
                continue;

            temp = multiply(epsComponent.toArray(new Tensor[epsComponent.size()]));
            epsComponent.clear();
            MappingsPort port = IndexMappings.createPort(temp, temp);
            IndexMappingBuffer buffer;
            Symmetry sym;

            IntArrayList nonPermutable = new IntArrayList();
            int[] indices = temp.getIndices().getFree().getAllIndices().copy();
            int[] epsIndices = content.get(epsPositions.get(i)).getIndices().getFree().getAllIndices().copy();

            boolean contract;
            for (b = 0; b < indices.length; ++b) {
                contract = false;
                for (a = 0; a < epsIndices.length; ++a)
                    if (indices[b] == inverseIndexState(epsIndices[a]))
                        contract = true;
                if (!contract)
                    nonPermutable.add(b);
            }
            int[] nonPermutablePositions = nonPermutable.toArray();

            if (indices.length == 1)
                continue;
            Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);
            while ((buffer = port.take()) != null) {
                sym = TensorUtils.getSymmetryFromMapping(indices, buffer);
                if (!checkNonPermutingPositions(sym, nonPermutablePositions))
                    continue;

                if (sym.isAntiSymmetry() != symmetries.get(sym.getPermutation()))
View Full Code Here

            Tensor riman1 = Tensors.parse(e0);
            Tensor riman2 = Tensors.parse(e1);

            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000; ++i) {
                MappingsPort mp = IndexMappings.createPort(riman1, riman2);
                Mapping buffera;
                while ((buffera = mp.take()) != null) ;
            }
            time += System.currentTimeMillis() - start;
        }
        return time;
    }
View Full Code Here

            //symmetries of eps indices, which are contracted with other product (also totally antisymmetric)
            Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
            MappingsPort port = IndexMappings.createPort(temp, temp);
            Mapping mapping;
            Symmetry sym;

            //check for two symmetric indices of product contracted with two antisymmetric indices of eps
            while ((mapping = port.take()) != null) {
                //symmetry of product indices
                sym = TensorUtils.getSymmetryFromMapping(indices, mapping);
                //if symmetry mixes indices of product, which are not contracted with eps
                if (!checkNonPermutingPositions(sym, nonPermutableArray))
                    continue;
View Full Code Here

            //symmetries of eps indices, which are contracted with other product (also totally antisymmetric)
            Map<Permutation, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
            MappingsPort port = IndexMappings.createPort(temp, temp);
            Mapping mapping;
            Permutation sym;

            //check for two symmetric indices of product contracted with two antisymmetric indices of eps
            while ((mapping = port.take()) != null) {
                //symmetry of product indices
                sym = TensorUtils.getSymmetryFromMapping(indices, mapping);
                //if symmetry mixes indices of product, which are not contracted with eps
                if (!checkNonPermutingPositions(sym, nonPermutableArray))
                    continue;
View Full Code Here

            Tensor riman1 = Tensors.parse(e0);
            Tensor riman2 = Tensors.parse(e1);

            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000; ++i) {
                MappingsPort mp = IndexMappings.createPort(riman1, riman2);
                IndexMappingBuffer buffera;
                while ((buffera = mp.take()) != null) ;
            }
            time += System.currentTimeMillis() - start;
        }
        return time;
    }
View Full Code Here

        Indices freeIndices = u.getIndices().getFreeIndices();
        if (!freeIndices.equalsRegardlessOrder(v.getIndices().getFreeIndices()))
            return false;
        int[] free = freeIndices.getAllIndices().copy();
        IndexMappingBuffer tester = new IndexMappingBufferTester(free, false);
        MappingsPort mp = IndexMappings.createPort(tester, u, v);
        IndexMappingBuffer buffer;

        while ((buffer = mp.take()) != null)
            if (buffer.getSignum() == false)
                return true;

        return false;
    }
View Full Code Here

            //symmetries of eps indices, which are contracted with other product (also totally antisymmetric)
            Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
            MappingsPort port = IndexMappings.createPort(temp, temp);
            IndexMappingBuffer buffer;
            Symmetry sym;

            //check for two symmetric indices of product contracted with two antisymmetric indices of eps
            while ((buffer = port.take()) != null) {
                //symmetry of product indices
                sym = TensorUtils.getSymmetryFromMapping(indices, buffer);
                //if symmetry mixes indices of product, which are not contracted with eps
                if (!checkNonPermutingPositions(sym, nonPermutableArray))
                    continue;
View Full Code Here

            //symmetries of eps indices, which are contracted with other product (also totally antisymmetric)
            Map<IntArray, Boolean> symmetries = getEpsilonSymmetries(indices.length);

            //symmetries of product, which is contracted with Levi-Civita
            MappingsPort port = IndexMappings.createPort(temp, temp);
            IndexMappingBuffer buffer;
            Symmetry sym;

            //check for two symmetric indices of product contracted with two antisymmetric indices of eps
            while ((buffer = port.take()) != null) {
                //symmetry of product indices
                sym = TensorUtils.getSymmetryFromMapping(indices, buffer);
                //if symmetry mixes indices of product, which are not contracted with eps
                if (!checkNonPermutingPositions(sym, nonPermutableArray))
                    continue;
View Full Code Here

TOP

Related Classes of cc.redberry.core.indexmapping.MappingsPort

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.