Package cc.redberry.core.utils

Examples of cc.redberry.core.utils.IntArray


        return data.clone();
    }

    @Override
    public final IntArray getAllIndices() {
        return new IntArray(data);
    }
View Full Code Here


        return byte2int(permutation);
    }

    @Override
    public IntArray oneLineImmutable() {
        return new IntArray(byte2int(permutation));
    }
View Full Code Here

    }

    public int size() {return fromNames.length;}

    public IntArray getFromNames() {
        return new IntArray(fromNames);
    }
View Full Code Here

    public IntArray getFromNames() {
        return new IntArray(fromNames);
    }

    public IntArray getToData() {
        return new IntArray(toData);
    }
View Full Code Here

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

//                    IndexMappingDirect im = new IndexMappingDirect();
                    IntArray termLow = temp.getIndices().getFree().getLower();
                    IntArray termUp = temp.getIndices().getFree().getUpper();

                    int[] oldIndices = new int[termUp.length() + termLow.length()],
                            newIndices = oldIndices.clone();
                    for (k = 0; k < termUp.length(); ++k) {
                        oldIndices[k] = termUp.get(k);
                        newIndices[k] = upperArray[u++];
                    }
                    for (k = 0; k < termLow.length(); ++k) {
                        oldIndices[k + termUp.length()] = termLow.get(k);
                        newIndices[k + termUp.length()] = lowerArray[l++];
                    }
                    temp = ApplyIndexMapping.applyIndexMapping(temp, new Mapping(oldIndices, newIndices), new int[0]);
                    tCombination.add(temp);
                }
View Full Code Here

     * @param data array of indices
     */
    AbstractIndices(int[] data) {
        this.data = data;
        this.size = data.length;
        this.dataContainer = new IntArray(data);
    }
View Full Code Here

    @Override
    public final IntArray getUpper() {
        if (upper == null)
            calculateUpperLower();
        return new IntArray(upper);
    }
View Full Code Here

    @Override
    public final IntArray getLower() {
        if (lower == null)
            calculateUpperLower();
        return new IntArray(lower);
    }
View Full Code Here

            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

     *
     * @see IntArray
     * @return IntArray representing integer array - one-line notated permutation
     */
    public IntArray getPermutation() {
        return new IntArray(permutation);
    }
View Full Code Here

TOP

Related Classes of cc.redberry.core.utils.IntArray

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.