Package cc.redberry.core.tensor

Examples of cc.redberry.core.tensor.Integral.vars()


    public Tensor transform(final Tensor tensor) {
        if (!(tensor instanceof Integral))
            return tensor;
        final Integral integral = (Integral) tensor;
        final Tensor target = integral.target();
        final SimpleTensor[] vars = integral.vars();
        if (!(target instanceof Sum))
            return tensor;
        Sum result = new Sum();
        for (Tensor summand : target)
            result.add(new Integral(summand.clone(), clone(vars)));
View Full Code Here


                    if (map.containsKey(st.getName()))
                        continue out_for;

                //current can be placed under current integral
                final Integral integral = integrals.get(i);
                integrals.set(i, new Integral(new Product(current, integral.target()), integral.vars()));
                iterator.remove();
            }
        }

        Product result = new Product();
View Full Code Here

    }

    @Override
    public IndexMappingProvider create(IndexMappingProvider opu, Tensor from, Tensor to, boolean allowDiffStates) {
        final Integral intFrom = (Integral) from, intTo = (Integral) to;
        final SimpleTensor[] varsFrom = intFrom.vars(), varsTo = intTo.vars();
        if (varsFrom.length != varsTo.length)
            return IndexMappingProvider.Util.EMPTY_PROVIDER;
        Arrays.sort(varsFrom); //TODO change to quick Sort
        Arrays.sort(varsTo); //TODO change to quick Sort
        int i;
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.