Package uk.ac.starlink.array
Class ScratchNDArray
java.lang.Object
uk.ac.starlink.array.DefaultArrayDescription
uk.ac.starlink.array.BridgeNDArray
uk.ac.starlink.array.ScratchNDArray
- All Implemented Interfaces:
ArrayDescription
,NDArray
- Direct Known Subclasses:
CopyNDArray
An NDArray with data held in a fast random-access scratch array in
memory or on local disk.
- Author:
- Mark Taylor (Starlink)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Typesafe enum class enumerating the types of backing store implementation available. -
Field Summary
Fields inherited from class uk.ac.starlink.array.DefaultArrayDescription
arrayDims, arrayHandler, arrayIsRandom, arrayIsReadable, arrayIsWritable, arrayNdim, arrayNpix, arrayOrder, arrayOrigin, arrayShape, arrayType
-
Constructor Summary
ConstructorsConstructorDescriptionScratchNDArray
(ArrayDescription template) Constructs a scratch array with shape, type and bad value handling characteristics copied from a template ArrayDescription.ScratchNDArray
(OrderedNDShape shape, Type type, BadHandler badHandler) Constructs a scratch array with shape, type and bad value handling supplied explicitly.ScratchNDArray
(OrderedNDShape shape, Type type, BadHandler badHandler, ScratchNDArray.BackingStore bstore) Constructs a scratch array with shape, type, bad value handling and backing store type supplied explicitly. -
Method Summary
Methods inherited from class uk.ac.starlink.array.BridgeNDArray
close, getAccess, getImpl, getURL, multipleAccess, toString
Methods inherited from class uk.ac.starlink.array.DefaultArrayDescription
getBadHandler, getShape, getType, isRandom, isReadable, isWritable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.ac.starlink.array.ArrayDescription
getBadHandler, getShape, getType, isRandom, isReadable, isWritable
-
Constructor Details
-
ScratchNDArray
Constructs a scratch array with shape, type and bad value handling characteristics copied from a template ArrayDescription. The nature of the backing store is chosen automatically based on how large the requested array will be.- Parameters:
template
- NDArray
-
ScratchNDArray
Constructs a scratch array with shape, type and bad value handling supplied explicitly. The nature of the backing store is chosen automatically based on how large the requested array will be.- Parameters:
shape
- shape of the new arraytype
- primitive data type of the new arraybadHandler
- bad value handler to use for the new array
-
ScratchNDArray
public ScratchNDArray(OrderedNDShape shape, Type type, BadHandler badHandler, ScratchNDArray.BackingStore bstore) Constructs a scratch array with shape, type, bad value handling and backing store type supplied explicitly.- Parameters:
shape
- shape of the new arraytype
- primitive data type of the new arraybadHandler
- bad value handler to use for the new arraybstore
- indicates what method should be used to implement the backing store of the array
-