Package net.algart.arrays
Interface PNumberArray
- All Known Subinterfaces:
ByteArray
,DoubleArray
,FloatArray
,IntArray
,LongArray
,MutableByteArray
,MutableDoubleArray
,MutableFloatArray
,MutableIntArray
,MutableLongArray
,MutablePFloatingArray
,MutablePIntegerArray
,MutablePNumberArray
,MutableShortArray
,PFloatingArray
,PIntegerArray
,ShortArray
,UpdatableByteArray
,UpdatableDoubleArray
,UpdatableFloatArray
,UpdatableIntArray
,UpdatableLongArray
,UpdatablePFloatingArray
,UpdatablePIntegerArray
,UpdatablePNumberArray
,UpdatableShortArray
- All Known Implementing Classes:
AbstractByteArray
,AbstractDoubleArray
,AbstractFloatArray
,AbstractIntArray
,AbstractLongArray
,AbstractShortArray
,AbstractUpdatableByteArray
,AbstractUpdatableDoubleArray
,AbstractUpdatableFloatArray
,AbstractUpdatableIntArray
,AbstractUpdatableLongArray
,AbstractUpdatableShortArray
AlgART array of any primitive numeric elements (byte, short, int, long, float or double), read-only access.
Any class implementing this interface must implement one of
ByteArray
, ShortArray
,
IntArray
, LongArray
,
FloatArray
, DoubleArray
subinterfaces.
- Author:
- Daniel Alievsky
-
Method Summary
Modifier and TypeMethodDescriptiondefault Matrix<? extends PNumberArray>
matrix
(long... dim) Equivalent tomatrix
(thisArray, dim).Class<? extends MutablePNumberArray>
Returns the canonical resizable AlgART type of arrays with the same element types: the class of one of 9 basic interfaces, describing all kinds of resizable AlgART arrays for 8 primitive and any non-primitive element types.Class<? extends PNumberArray>
type()
Returns the canonical AlgART type of this array: the class of one of 9 basic interfaces, describing all kinds of AlgART arrays for 8 primitive and any non-primitive element types.Class<? extends UpdatablePNumberArray>
Returns the canonical updatable AlgART type of arrays with the same element types: the class of one of 9 basic interfaces, describing all kinds of updatable AlgART arrays for 8 primitive and any non-primitive element types.Methods inherited from interface net.algart.arrays.Array
asCopyOnNextWrite, buffer, buffer, buffer, buffer, byteOrder, capacity, checkUnallowedMutation, elementType, equals, flushResources, flushResources, freeResources, freeResources, getData, getData, getElement, hashCode, isCopyOnNextWrite, isEmpty, isImmutable, isLazy, isNew, isNewReadOnlyView, isUnresizable, ja, length, length32, loadResources, newJavaArray, shallowClone, subArr, subArray, toString
Methods inherited from interface net.algart.arrays.PArray
asImmutable, asTrustedImmutable, bitsPerElement, getDouble, indexOf, isZeroFilled, jaByte, jaDouble, jaFloat, jaInt, jaLong, jaShort, lastIndexOf, maxPossibleValue, minPossibleValue, mutableClone, updatableClone
-
Method Details
-
type
Class<? extends PNumberArray> type()Description copied from interface:Array
Returns the canonical AlgART type of this array: the class of one of 9 basic interfaces, describing all kinds of AlgART arrays for 8 primitive and any non-primitive element types. More precisely, returns:BitArray
.class, if this object is an instance ofBitArray
,CharArray
.class, if this object is an instance ofCharArray
,ByteArray
.class, if this object is an instance ofByteArray
,ShortArray
.class, if this object is an instance ofShortArray
,IntArray
.class, if this object is an instance ofIntArray
,LongArray
.class, if this object is an instance ofLongArray
,FloatArray
.class, if this object is an instance ofFloatArray
,DoubleArray
.class, if this object is an instance ofDoubleArray
,ObjectArray
.class, if this object is an instance ofObjectArray
.
There is a guarantee that this method works very quickly (usually it just returns a constant value).
-
updatableType
Class<? extends UpdatablePNumberArray> updatableType()Description copied from interface:Array
Returns the canonical updatable AlgART type of arrays with the same element types: the class of one of 9 basic interfaces, describing all kinds of updatable AlgART arrays for 8 primitive and any non-primitive element types. More precisely, returns:UpdatableBitArray
.class, if this object is an instance ofBitArray
,UpdatableCharArray
.class, if this object is an instance ofCharArray
,UpdatableByteArray
.class, if this object is an instance ofByteArray
,UpdatableShortArray
.class, if this object is an instance ofShortArray
,UpdatableIntArray
.class, if this object is an instance ofIntArray
,UpdatableLongArray
.class, if this object is an instance ofLongArray
,UpdatableFloatArray
.class, if this object is an instance ofFloatArray
,UpdatableDoubleArray
.class, if this object is an instance ofDoubleArray
,UpdatableObjectArray
.class, if this object is an instance ofObjectArray
.
There is a guarantee that this method works very quickly (usually it just returns a constant value).
- Specified by:
updatableType
in interfaceArray
- Specified by:
updatableType
in interfacePArray
- Returns:
- canonical AlgART type of an updatable array of the same kind.
-
mutableType
Class<? extends MutablePNumberArray> mutableType()Description copied from interface:Array
Returns the canonical resizable AlgART type of arrays with the same element types: the class of one of 9 basic interfaces, describing all kinds of resizable AlgART arrays for 8 primitive and any non-primitive element types. More precisely, returns:MutableBitArray
.class, if this object is an instance ofBitArray
,MutableCharArray
.class, if this object is an instance ofCharArray
,MutableByteArray
.class, if this object is an instance ofByteArray
,MutableShortArray
.class, if this object is an instance ofShortArray
,MutableIntArray
.class, if this object is an instance ofIntArray
,MutableLongArray
.class, if this object is an instance ofLongArray
,MutableFloatArray
.class, if this object is an instance ofFloatArray
,MutableDoubleArray
.class, if this object is an instance ofDoubleArray
,MutableObjectArray
.class, if this object is an instance ofObjectArray
.
There is a guarantee that this method works very quickly (usually it just returns a constant value).
- Specified by:
mutableType
in interfaceArray
- Specified by:
mutableType
in interfacePArray
- Returns:
- canonical AlgART type of a resizable array of the same kind.
-
matrix
Description copied from interface:Array
Equivalent tomatrix
(thisArray, dim).
-