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

mikera.arrayz.impl.IStridedArray Maven / Gradle / Ivy

Go to download

Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.

There is a newer version: 0.67.0
Show newest version
package mikera.arrayz.impl;

import mikera.arrayz.INDArray;

/**
 * Interface for arrays that support strided access over an underlying double[] array
 * 
 * @author Mike
 *
 */
public interface IStridedArray extends INDArray {
	/**
	 * Gets the underlying data array for this strided array
	 * 
	 * Unsafe operation - may allow modification of otherwise immutable arrays
	 * @return
	 */
	public double[] getArray();
	
	/**
	 * Gets the data array offset for the first element of this strided array
	 * @return
	 */
	public int getArrayOffset();
	
	/**
	 * Gets the strides for each dimension of this strided array. 
	 * 
	 * The returned array should not be modified
	 * @return
	 */
	public int[] getStrides();
	
	/**
	 * Gets the stide for a specific dimension in this strided array.
	 * @param dimension
	 * @return
	 */
	public int getStride(int dimension);

	/**
	 * Checks if this array is fully packed in row major order.
	 * @return
	 */
	boolean isPackedArray();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy