mikera.indexz.impl.ComputedIndex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vectorz Show documentation
Show all versions of vectorz Show documentation
Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.
package mikera.indexz.impl;
import mikera.indexz.AIndex;
/**
* Abstract base class for computed indexes.
*
* Intended for extension via an (anonymous) inner class.
*
* @author Mike
*
*/
@SuppressWarnings("serial")
public abstract class ComputedIndex extends AIndex {
protected final int length;
public ComputedIndex(int length) {
assert(length>=0);
this.length=length;
}
@Override
public boolean isFullyMutable() {
return false;
}
@Override
public final int length() {
return length;
}
@Override
public int indexPosition(int x) {
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy