All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nd4j.linalg.indexing.NDArrayIndexAll Maven / Gradle / Ivy

package org.nd4j.linalg.indexing;

import org.nd4j.linalg.api.ndarray.INDArray;

/**
 * Mainly meant for internal use:
 * represents all of the elements of a dimension
 *
 * @author Adam Gibson
 */
public class NDArrayIndexAll extends IntervalIndex {

    /**
     * @param inclusive whether to include the last number
     */
    public NDArrayIndexAll(boolean inclusive) {
        super(inclusive, 1);
    }


    @Override
    public void init(INDArray arr, long begin, int dimension) {
        this.begin = 0;
        this.end = arr.size(dimension);
        this.length = (Math.abs(end - begin));
    }



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy