Package cc.redberry.core.parser

Examples of cc.redberry.core.parser.ParseToken


    private final TIntObjectHashMap<Expression> cachedSubstitutions = new TIntObjectHashMap<>();

    private Tensor traceWithout5(Tensor tensor, int numberOfGammas) {
        Expression substitution = cachedSubstitutions.get(numberOfGammas);
        if (substitution == null) {
            ParseToken rawSubstitution = createRawGammaSubstitution(numberOfGammas);
            substitution = (Expression) tokenTransformer.transform(rawSubstitution).toTensor();
            cachedSubstitutions.put(numberOfGammas, substitution);
        }

        tensor = substitution.transform(tensor);
View Full Code Here


        tensor = deltaTrace.transform(tensor);
        return tensor;
    }

    private static ParseToken createRawGammaSubstitution(int numberOfGammas) {
        ParseToken substitution = cachedRawGammaTraces.get(numberOfGammas);
        if (substitution == null) {

            //product of gamma matrices as array
            Tensor[] gammas = new Tensor[numberOfGammas];
            int matrixIndex = setType(IndexType.Matrix1, 0) - 1, metricIndex = -1;
View Full Code Here

        return tensor instanceof SimpleTensor && ((SimpleTensor) tensor).getName() == leviCivitaName;
    }


    private Expression getLeviCivitaSelfContraction() {
        ParseToken substitutionToken = cachedLeviCivitaSelfContractions.get(numberOfIndices);
        if (substitutionToken == null) {

            //the l.h.s. of substitution: eps_{abc...}*eps^{pqr...}
            //lower indices of eps ( eps_{...lower...} )
            int[] lower = new int[numberOfIndices];
View Full Code Here

    private final TIntObjectHashMap<Expression> cachedSubstitutions = new TIntObjectHashMap<>();

    private Tensor traceWithout5(Tensor tensor, int numberOfGammas) {
        Expression substitution = cachedSubstitutions.get(numberOfGammas);
        if (substitution == null) {
            ParseToken rawSubstitution = createRawGammaSubstitution(numberOfGammas);
            substitution = (Expression) tokenTransformer.transform(rawSubstitution).toTensor();
            cachedSubstitutions.put(numberOfGammas, substitution);
        }

        tensor = substitution.transform(tensor);
View Full Code Here

        tensor = deltaTrace.transform(tensor);
        return tensor;
    }

    private static ParseToken createRawGammaSubstitution(int numberOfGammas) {
        ParseToken substitution = cachedRawGammaTraces.get(numberOfGammas);
        if (substitution == null) {

            //product of gamma matrices as array
            Tensor[] gammas = new Tensor[numberOfGammas];
            int matrixIndex = setType(IndexType.Matrix1, 0) - 1, metricIndex = -1;
View Full Code Here

        return tensor instanceof SimpleTensor && ((SimpleTensor) tensor).getName() == leviCivitaName;
    }


    private Expression getLeviCivitaSelfContraction() {
        ParseToken substitutionToken = cachedLeviCivitaSelfContractions.get(numberOfIndices);
        if (substitutionToken == null) {

            //the l.h.s. of substitution: eps_{abc...}*eps^{pqr...}
            //lower indices of eps ( eps_{...lower...} )
            int[] lower = new int[numberOfIndices];
View Full Code Here

    private final TIntObjectHashMap<Expression> cachedSubstitutions = new TIntObjectHashMap<>();

    private Tensor traceWithout5(Tensor tensor, int numberOfGammas) {
        Expression substitution = cachedSubstitutions.get(numberOfGammas);
        if (substitution == null) {
            ParseToken rawSubstitution = createRawGammaSubstitution(numberOfGammas);
            substitution = (Expression) tokenTransformer.transform(rawSubstitution).toTensor();
            cachedSubstitutions.put(numberOfGammas, substitution);
        }

        tensor = substitution.transform(tensor);
View Full Code Here

        tensor = deltaTrace.transform(tensor);
        return tensor;
    }

    private static ParseToken createRawGammaSubstitution(int numberOfGammas) {
        ParseToken substitution = cachedRawGammaTraces.get(numberOfGammas);
        if (substitution == null) {

            //product of gamma matrices as array
            Tensor[] gammas = new Tensor[numberOfGammas];
            int matrixIndex = setType(IndexType.Matrix1, 0) - 1, metricIndex = -1;
View Full Code Here

        return tensor instanceof SimpleTensor && ((SimpleTensor) tensor).getName() == leviCivitaName;
    }


    private Expression getLeviCivitaSelfContraction() {
        ParseToken substitutionToken = cachedLeviCivitaSelfContractions.get(numberOfIndices);
        if (substitutionToken == null) {

            //the l.h.s. of substitution: eps_{abc...}*eps^{pqr...}
            //lower indices of eps ( eps_{...lower...} )
            int[] lower = new int[numberOfIndices];
View Full Code Here

        return tensor instanceof SimpleTensor && ((SimpleTensor) tensor).getName() == leviCivitaName;
    }


    private Expression getLeviCivitaSelfContraction() {
        ParseToken substitutionToken = cachedLeviCivitaSelfContractions.get(numberOfIndices);
        if (substitutionToken == null) {

            //the l.h.s. of substitution: eps_{abc...}*eps^{pqr...}
            //lower indices of eps ( eps_{...lower...} )
            int[] lower = new int[numberOfIndices];
View Full Code Here

TOP

Related Classes of cc.redberry.core.parser.ParseToken

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.