Examples of equivalent()


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

                    res.add(derivative);//if (derivative != current)
                //it.set(derivative);
            }
            if (res.isEmpty())
                return null;
            return res.equivalent();
        } else if (target instanceof Product) {
            Product product = (Product) target;
            Tensor derivative;
            List<Tensor> resultProducts = new ArrayList<>();
            for (int i = 0; i < product.size(); ++i) {
View Full Code Here

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

    @Override
    public final Tensor result() {
        Sum sum = new Sum();
        for (Split sp : collectedTerms)
            sum.add(sp.tensorEquvivalent());
        Tensor result = sum.equivalent();
        result.setParent(CC.getRootParentTensor());
        return result;
    }

    @Override
View Full Code Here

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

                    res.add(derivative);//if (derivative != current)
                //it.set(derivative);
            }
            if (res.isEmpty())
                return null;
            return res.equivalent();
        } else if (target instanceof Product) {
            Product product = (Product) target;
            Tensor derivative;
            List<Tensor> resultProducts = new ArrayList<>();
            for (int i = 0; i < product.size(); ++i) {
View Full Code Here

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

    @Override
    public final Tensor result() {
        Sum sum = new Sum();
        for (Split sp : collectedTerms)
            sum.add(sp.tensorEquvivalent());
        Tensor result = sum.equivalent();
        result.setParent(CC.getRootParentTensor());
        return result;
    }

    @Override
View Full Code Here

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

                else res.add(derivative);// if (derivative != current)
                    //it.set(derivative);
            }
            if (res.isEmpty())
                return null;
            return res.equivalent();
        } else if (target instanceof Product) {
            Product product = (Product) target;
            Tensor derivative;
            List<Tensor> resultProducts = new ArrayList<>();
            for (int i = 0; i < product.size(); ++i) {
View Full Code Here

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

        for (ConcurrentGrowingList<FactorNode> list : nodes.values()) {
            ConcurrentGrowingList<FactorNode>.GrowingIterator gi = list.iterator();
            while ((node = gi.next()) != null)
                result.add(new Product(node.cip.result(), node.factor));
        }
        return result.equivalent();
    }

    private static Boolean compare(Tensor from, Tensor to) {
        int[] fromIndices = from.getIndices().getFreeIndices().getAllIndices().copy();
        for (int i = 0; i < fromIndices.length; ++i)
View Full Code Here

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

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

    void generateCollectedTermsList(Sum tensor) {
        currentPattern = splitPatterns;
        OUT_FOR:
View Full Code Here

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

        for (SplitNumber split : result)
            if (split.number.isOne())
                sum.add(split.nonNumber);
            else
                sum.add(new Product(split.number, split.nonNumber));
        return sum.equivalent();
    }

    private SplitNumber splitNumber(Tensor tensor) {
        if (tensor instanceof SimpleTensor)
            return new SplitNumber(TensorNumber.createONE(), tensor);
View Full Code Here

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

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
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.