org.ojalgo.access
Class SimpleArray<N extends Number>
java.lang.Object
org.ojalgo.access.SimpleArray<N>
- All Implemented Interfaces:
- Access1D<N>
- Direct Known Subclasses:
- SimpleArray.Big, SimpleArray.Complex, SimpleArray.Primitive
public abstract class SimpleArray<N extends Number>
- extends Object
- implements Access1D<N>
The purpose of (use case for) this class is to provide a minimal class
that implements the Access1D
interface and is mutable. Further
the user can assume that a SimpleArray instance really
is an SimpleArray.Big instance (and correspondingly for Double and
ComplexNumber). Therefore it is safe to type cast and
reference the data attribute.
- Author:
- apete
length
public final int length
makeBig
public static final SimpleArray.Big makeBig(int aLength)
makeComplex
public static final SimpleArray.Complex makeComplex(int aLength)
makePrimitive
public static final SimpleArray.Primitive makePrimitive(int aLength)
set
public abstract void set(int anInd,
double aNmbr)
set
public abstract void set(int anInd,
N aNmbr)
size
public int size()
- Returns:
- The total number of elements contained in this structure
doubleValue
public double doubleValue(int anInd)
get
public N get(int anInd)