uk.ac.starlink.array
Class ScratchNDArray

java.lang.Object
  extended by uk.ac.starlink.array.DefaultArrayDescription
      extended by uk.ac.starlink.array.BridgeNDArray
          extended by uk.ac.starlink.array.ScratchNDArray
All Implemented Interfaces:
ArrayDescription, NDArray
Direct Known Subclasses:
CopyNDArray

public class ScratchNDArray
extends BridgeNDArray

An NDArray with data held in a fast random-access scratch array in memory or on local disk.

Author:
Mark Taylor (Starlink)
See Also:
CopyNDArray

Nested Class Summary
static class ScratchNDArray.BackingStore
          Typesafe enum class enumerating the types of backing store implementation available.
 
Nested classes/interfaces inherited from class uk.ac.starlink.array.BridgeNDArray
BridgeNDArray.BridgeNDArrayHdxFacade
 
Field Summary
 
Fields inherited from class uk.ac.starlink.array.DefaultArrayDescription
arrayDims, arrayHandler, arrayIsRandom, arrayIsReadable, arrayIsWritable, arrayNdim, arrayNpix, arrayOrder, arrayOrigin, arrayShape, arrayType
 
Constructor Summary
ScratchNDArray(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, getHdxFacade, 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 Detail

ScratchNDArray

public ScratchNDArray(ArrayDescription template)
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

public ScratchNDArray(OrderedNDShape shape,
                      Type type,
                      BadHandler badHandler)
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 array
type - primitive data type of the new array
badHandler - 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 array
type - primitive data type of the new array
badHandler - bad value handler to use for the new array
bstore - indicates what method should be used to implement the backing store of the array


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.