Examples of equivalent()


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

                    continue;
                Product clone = (Product) product.clone();
                clone.getElements().remove(i);
                if (!isOne(derivative))
                    clone.add(derivative);
                resultProducts.add(clone.equivalent());
            }
            if (resultProducts.isEmpty())
                return null;
            if (resultProducts.size() == 1)
                return resultProducts.get(0);
View Full Code Here

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

            Product kroneckers = new Product();
            Indices targetIndices = sp.getIndices();
            Indices varIndices = var.getIndices();
            for (int i = 0; i < sp.getIndices().size(); ++i)
                kroneckers.add(CC.createMetricOrKronecker(targetIndices.get(i), varIndices.get(i)));
            return kroneckers.equivalent();
        } else if (target.getClass() == TensorField.class) {
            TensorField field = (TensorField) target;
            Tensor[] args = field.getArgs();
            for (int i = 0; i < args.length; ++i)
                if (getDerivative(args[i], var) != null)
View Full Code Here

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

                    continue;
                Product clone = (Product) product.clone();
                clone.getElements().remove(i);
                if (!isOne(derivative))
                    clone.add(derivative);
                resultProducts.add(clone.equivalent());
            }
            if (resultProducts.isEmpty())
                return null;
            if (resultProducts.size() == 1)
                return resultProducts.get(0);
View Full Code Here

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

            Product kroneckers = new Product();
            Indices targetIndices = sp.getIndices();
            Indices varIndices = var.getIndices();
            for (int i = 0; i < sp.getIndices().size(); ++i)
                kroneckers.add(CC.createMetricOrKronecker(targetIndices.get(i), varIndices.get(i)));
            return kroneckers.equivalent();
        } else if (target.getClass() == TensorField.class) {
            TensorField field = (TensorField) target;
            Tensor[] args = field.getArgs();
            for (int i = 0; i < args.length; ++i)
                if (getDerivative(args[i], var) != null)
View Full Code Here

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

            denom.add(_t2.clone());
            denom.add(common);
            return new Struct(
                    _t2.isEmpty() ? null : _t2.equivalent(),
                    _t1.isEmpty() ? null : _t1.equivalent(),
                    denom.equivalent());
        } else if (TTest.testParity(t1, t2))
            return new Struct(null, null, t1);
        else
            return new Struct(t2.clone(), t1.clone(), new Product(t1, t2));
    }
View Full Code Here

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

    @Override
    public Tensor transform(Tensor tensor) {
        Product result = new Product();
        result.add(renameIndicesAndBuidKroneckers(tensor));
        result.add(kroneckers);
        return result.equivalent();
    }

    public abstract Tensor renameIndicesAndBuidKroneckers(Tensor tensor);

    protected abstract IndexGenerator createIndexGenerator(Tensor tensor);
View Full Code Here

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

    @Override
    public Tensor transform(Tensor tensor) {
        Product result = new Product();
        result.add(renameIndicesAndBuidKroneckers(tensor));
        result.add(kroneckers);
        return result.equivalent();
    }

    public Tensor renameIndicesAndBuidKroneckers(Tensor tensor) {
        if (tensor instanceof SimpleTensor || tensor instanceof Product) {
            Indices indices = tensor.getIndices();
View Full Code Here

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

    public Tensor getResult() {
        Product result = new Product();
        for (Pair p : collected)
            result.add(p.get());
        return result.equivalent();
    }

    private static class Pair {
        Tensor innerTensor;
        Sum power = new Sum();
View Full Code Here

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

        }

        Product result = new Product();
        result.add(tensor);
        result.add(integrals);
        return result.equivalent();
    }
}
View Full Code Here

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

                    continue;
                Product clone = (Product) product.clone();
                clone.getElements().remove(i);
                if (!isOne(derivative))
                    clone.add(derivative);
                resultProducts.add(clone.equivalent());
            }
            if (resultProducts.isEmpty())
                return null;
            if (resultProducts.size() == 1)
                return resultProducts.get(0);
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.