Package matlabcontrol.extensions
Class MatlabNumericArray.DoubleArrayType<T>
- java.lang.Object
-
- matlabcontrol.extensions.MatlabNumericArray.DoubleArrayType<T>
-
- Type Parameters:
T- an array of 2 or more dimensions which holdsdoubles
- Enclosing class:
- MatlabNumericArray
public static final class MatlabNumericArray.DoubleArrayType<T> extends java.lang.ObjectAn array type of dimension 2 or greater which holdsdoubles. Instances for dimensions 2 through 9 are available aspublic staticfields.
This class is unconditionally thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description static MatlabNumericArray.DoubleArrayType<double[][]>DIM_2Representation ofdouble[][]class.static MatlabNumericArray.DoubleArrayType<double[][][]>DIM_3Representation ofdouble[][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][]>DIM_4Representation ofdouble[][][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][][]>DIM_5Representation ofdouble[][][][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][][][]>DIM_6Representation ofdouble[][][][][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][][][][]>DIM_7Representation ofdouble[][][][][][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][][][][][]>DIM_8Representation ofdouble[][][][][][][][]class.static MatlabNumericArray.DoubleArrayType<double[][][][][][][][][]>DIM_9Representation ofdouble[][][][][][][][][]class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>getArrayClass()The type of array.intgetDimensions()The number of dimensions of the array type.static <T> MatlabNumericArray.DoubleArrayType<T>getInstance(java.lang.Class<T> arrayType)Gets an instance ofDoubleArrayType<T>whereTis the type ofarrayType.java.lang.StringtoString()Returns a brief description of this double array type.
-
-
-
Field Detail
-
DIM_2
public static final MatlabNumericArray.DoubleArrayType<double[][]> DIM_2
Representation ofdouble[][]class.
-
DIM_3
public static final MatlabNumericArray.DoubleArrayType<double[][][]> DIM_3
Representation ofdouble[][][]class.
-
DIM_4
public static final MatlabNumericArray.DoubleArrayType<double[][][][]> DIM_4
Representation ofdouble[][][][]class.
-
DIM_5
public static final MatlabNumericArray.DoubleArrayType<double[][][][][]> DIM_5
Representation ofdouble[][][][][]class.
-
DIM_6
public static final MatlabNumericArray.DoubleArrayType<double[][][][][][]> DIM_6
Representation ofdouble[][][][][][]class.
-
DIM_7
public static final MatlabNumericArray.DoubleArrayType<double[][][][][][][]> DIM_7
Representation ofdouble[][][][][][][]class.
-
DIM_8
public static final MatlabNumericArray.DoubleArrayType<double[][][][][][][][]> DIM_8
Representation ofdouble[][][][][][][][]class.
-
DIM_9
public static final MatlabNumericArray.DoubleArrayType<double[][][][][][][][][]> DIM_9
Representation ofdouble[][][][][][][][][]class.
-
-
Method Detail
-
getInstance
public static <T> MatlabNumericArray.DoubleArrayType<T> getInstance(java.lang.Class<T> arrayType)
Gets an instance ofDoubleArrayType<T>whereTis the type ofarrayType.Tmust be an array of 1 or more dimensions that holdsdoubles. This is intended for getting array types in excess of 9 dimensions, as dimensions 2 through 9 are represented by constantsDIM_2 ... DIM_9.
Contrived example usage:
DoubleArrayType<double[][][]> type3D = DoubleArrayType.getInstance(double[][][].class);- Type Parameters:
T-- Parameters:
arrayType-- Returns:
- Throws:
java.lang.IllegalArgumentException- if the type is not an array holdingdoubles or the type is of less than 2 dimensions
-
getDimensions
public int getDimensions()
The number of dimensions of the array type.- Returns:
-
getArrayClass
public java.lang.Class<T> getArrayClass()
The type of array. The array holdsdoubles, and may be of any dimension 2 or greater.- Returns:
-
toString
public java.lang.String toString()
Returns a brief description of this double array type. The exact details of this representation are unspecified and are subject to change.- Overrides:
toStringin classjava.lang.Object- Returns:
-
-