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

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

There is a newer version: 1.0.0-M2.1
Show newest version
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, int begin, int dimension) {
        this.begin = 0;
        this.end = arr.size(dimension);
        this.length = (Math.abs(end - begin));
    }



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy