Package cc.redberry.core.utils

Examples of cc.redberry.core.utils.IntArray


        return new IntArray(ul.lower);
    }

    @Override
    public final IntArray getAllIndices() {
        return new IntArray(data);
    }
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

     * Returns the names of from indices.
     *
     * @return names of from indices
     */
    public IntArray getFromNames() {
        return new IntArray(fromNames);
    }
View Full Code Here

     * Returns the data array that represents to indices.
     *
     * @return data array that represents to indices.
     */
    public IntArray getToData() {
        return new IntArray(toData);
    }
View Full Code Here

        return short2int(permutation);
    }

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

    private final HashMap<IntArray, DFromTo> derivatives = new HashMap<>();

    public PrimitiveTensorFieldSubstitution(Tensor from, Tensor to) {
        super(from, to);
        this.fromDescriptor = ((TensorField) from).getNameDescriptor();
        this.orders = new IntArray(fromDescriptor.getDerivativeOrders());
        this.derivatives.put(this.orders, new DFromTo((TensorField) from, to));
    }
View Full Code Here

        //check whether derivative orders in from less or equal to orders of current node
        for (int i = currentNode.size() - 1; i >= 0; --i)
            if (currentDescriptor.getDerivativeOrder(i) < fromDescriptor.getDerivativeOrder(i))
                return currentNode;

        IntArray orders = new IntArray(currentDescriptor.getDerivativeOrders());
        DFromTo derivative = derivatives.get(orders);
        if (derivative == null) {
            int order, j;
            SimpleTensor var;
            int[] indices;
            SimpleIndices varIndices;
            TensorField __from = (TensorField) this.from;
            Tensor __to = this.to;
            IndexGeneratorImpl ig = null;
            for (int i = orders.length() - 1; i >= 0; --i) {
                order = orders.get(i) - this.orders.get(i);
                while (order > 0) {
                    var = (SimpleTensor) from.get(i);
                    indices = new int[var.getIndices().size()];

                    //lazy initialization
View Full Code Here

        return permutation.clone();
    }

    @Override
    public IntArray oneLineImmutable() {
        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.