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

mikera.indexz.impl.SequentialIndex 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.indexz.impl;

/**
 * Class representing a sequential index [a, a+1, a+2..... b]
 * @author Mike
 *
 */
public class SequentialIndex extends ComputedIndex {
	private static final long serialVersionUID = 8586796655048075367L;

	private final int start;
	
	public SequentialIndex(int start, int length) {
		super(length);
		this.start=start;
	}
	
	@Override
	public int minIndex() {
		return start;
	}

	@Override
	public int maxIndex() {
		return start+length-1;
	}
	
	@Override
	public int get(int i) {
		assert((i>=0)&&(i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy