Package cc.redberry.core.indexmapping

Examples of cc.redberry.core.indexmapping.IndexMappingDirect


            l = 0;
            for (i = 0; i < combination.length; ++i)
                for (int j = 0; j < combination[i]; ++j) {
                    Tensor temp = samples[i].clone();

                    IndexMappingDirect im = new IndexMappingDirect();
                    IntArray termLow = temp.getIndices().getLower();
                    im.add(termLow, Arrays.copyOfRange(lowArray, l, l + termLow.length()));
                    l += termLow.length();

                    IntArray termUp = temp.getIndices().getUpper();
                    im.add(termUp, Arrays.copyOfRange(upArray, u, u + termUp.length()));
                    u += termUp.length();

                    temp = ApplyIndexMappingDirectTransformation.INSTANCE.perform(temp, im);
                    tCombination.add(temp);
                }
View Full Code Here


                for (int j = 0; j < fromIndices.size(); ++j)
                    if (IndicesUtils.getRawStateInt(fromIndices.get(j))
                            != IndicesUtils.getRawStateInt(currentIndices.get(j)))
                        return null;

            final IndexMappingDirect im = new IndexMappingDirect(fromIndices,
                    currentIndices);
            if (argFrom.getIndices().applyIndexMapping(im))
                argFrom.update();
            argsSubstitutions[i] =
                    new SimpleTensorSubstitution((SimpleTensor) argFrom, argCurrent, allowDiffStates);
View Full Code Here

            SimpleIndices fromIndices, toIndices;
            for (int i = 0; i < length; ++i) {

                if (!(fromIndices = from[i].getIndices()).similarTypeStructure((toIndices = to[i].getIndices())))
                    return null;
                final IndexMappingDirect im = new IndexMappingDirect(fromIndices, toIndices);
                ApplyIndexMappingDirectTransformation.INSTANCE.perform(from[i], im);
                subs[i] = SubstitutionsFactory.createSubstitution(from[i], to[i]);
            }
            return subs;
        }
View Full Code Here

TOP

Related Classes of cc.redberry.core.indexmapping.IndexMappingDirect

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.