uk.ac.starlink.array
Class DummyNDArray
java.lang.Object
uk.ac.starlink.array.DefaultArrayDescription
uk.ac.starlink.array.BridgeNDArray
uk.ac.starlink.array.DummyNDArray
- All Implemented Interfaces:
- ArrayDescription, NDArray
public class DummyNDArray
- extends BridgeNDArray
NDArray backed by no data. It is read-only, and all its pixels have
the bad value. It may be used as a source of bad values, or as a
place-holder where an NDArray of a certain shape and type is required
but whose data is not needed.
For a more flexible no-data array use the DeterministicArrayImpl
class (or write your own).
- Author:
- Mark Taylor (Starlink)
- See Also:
DeterministicArrayImpl
Fields inherited from class uk.ac.starlink.array.DefaultArrayDescription |
arrayDims, arrayHandler, arrayIsRandom, arrayIsReadable, arrayIsWritable, arrayNdim, arrayNpix, arrayOrder, arrayOrigin, arrayShape, arrayType |
Constructor Summary |
DummyNDArray(NDArray nda)
Constructs a new DummyNDArray with the same characteristics
(pixel sequence, type and bad value handler) as a template NDArray. |
DummyNDArray(NDShape shape,
Type type)
Constructs a new DummyNDArray with a given shape and type and
default pixel sequence and bad value. |
DummyNDArray(OrderedNDShape oshape,
Type type,
BadHandler bh)
Constructs a new DummyNDArray with a given shape and type and
bad value handler. |
DummyNDArray
public DummyNDArray(OrderedNDShape oshape,
Type type,
BadHandler bh)
- Constructs a new DummyNDArray with a given shape and type and
bad value handler. By setting the bad value handler appropriately,
the primitive value that the array returns can be modified.
- Parameters:
oshape
- the pixel sequencetype
- the numeric typebh
- the bad value handler
DummyNDArray
public DummyNDArray(NDShape shape,
Type type)
- Constructs a new DummyNDArray with a given shape and type and
default pixel sequence and bad value.
- Parameters:
shape
- the shapetype
- the numeric type
DummyNDArray
public DummyNDArray(NDArray nda)
- Constructs a new DummyNDArray with the same characteristics
(pixel sequence, type and bad value handler) as a template NDArray.
- Parameters:
nda
- template NDArray
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.