Package cc.redberry.core.tensor

Examples of cc.redberry.core.tensor.Tensor.equivalent()


        TensorIterator it = factors.iterator();
        Tensor equivalent;
        Tensor current;
        while (it.hasNext()) {
            current = it.next();
            equivalent = current.equivalent();
            if (current != equivalent)
                it.set(equivalent);
        }
        return pairProduct(Transformations.calculateNumbers(factors), term.equivalent());
    }
View Full Code Here


        TensorIterator it = factors.iterator();
        Tensor equivalent;
        Tensor current;
        while (it.hasNext()) {
            current = it.next();
            equivalent = current.equivalent();
            if (current != equivalent)
                it.set(equivalent);
        }
        return pairProduct(Transformations.calculateNumbers(factors), term.equivalent());
    }
View Full Code Here

        Sum result = new Sum();
        Tensor temp;
        for (CollectedTerm collectedTerm : collectedTerms) {
            temp = collectedTerm.result();
            temp = Transformations.calculateNumbers(temp);
            result.add(temp.equivalent());
        }
        return result.equivalent();
    }

    void generateCollectedTermsList(Sum tensor) {
View Full Code Here

            throw new ParserException("Can not parse empty expression");
        Tensor t;
        for (TensorParser tp : parsers) {
            t = tp.parse(expression, this);
            if (t != null)
                return t.equivalent(); //TODO equivalent ?
        }

        System.out.println("ERROR: Parser cannot parse the following expression:" + expression);
        throw new ParserException("Cannot parse expression!");
    }
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.