Class 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:
  • Constructor Details

    • 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 sequence
      type - the numeric type
      bh - 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 shape
      type - 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