N-dimensional Array Objects (NAOs)

A NAO is a data structure in memory. A NAO consists of the following components:
slot number
Index of entry in internal table used to provide fast access to NAOs.
sequence number
Number (starting from 1) assigned in order of creation of NAOs.
OOC-name
Name of object-oriented command associated with NAO. Also used as unique identifier of NAO.
reference count
Number of Tcl variables, NAOs, windows, etc. pointing to this NAO. If the count decrements to 0 then NAP deletes the NAO and its associated OOC.
nap_cd
pointer to NAP structure created for each interpreter.
dataType
one of the following:
Name Description
c8 8-bit character
i8 8-bit signed integer
i16 16-bit signed integer
i32 32-bit signed integer
u8 8-bit unsigned integer
u16 16-bit unsigned integer
u32 32-bit unsigned integer
f32 32-bit floating-point
f32 64-bit floating-point
ragged compressed
boxed slot numbers (used as pointers to NAOs)
step
An efficiency hint for searching vectors. If this component is undefined before a search then NAP defines it according to whether the vector is
mortal
This is set FALSE for NAOs (e.g. standard missing values) which must not be deleted regardless of reference count.
label
Text containing title, description of data, etc.
unit
Text defining unit of measure.
rank
number of dimensions.
nels
number of elements = product(shape).
nbytes
number of bytes in NAO. Mainly for debugging.
link slot
slot number (0 = none) of link NAO, which can be used to attach further information to a NAO (possibly via a boxed NAO which could link to any number of further NAOs).
next slot
used internally to create NAO death list when executing a Tcl procedure defining a NAP function. (0 = none)
missing value slot
slot number (0=none) of missing-value NAO.
pointer to missing value
pointer to missing value NAO (for fast access).
pointer to missing value function
This function tests whether an element of a NAO is missing.
ragged start slot number
slot number (0=none) of vector NAO giving start index of each row of ragged array.
shape
sizes of dimensions.
dimension names
names (if any) of dimensions.
coordinate-variable slot numbers
slot numbers (0 = none) of CVs.
data
Main data.

Author: Harvey Davies       © 2002, CSIRO Australia.       Legal Notice and Disclaimer
CVS Version Details: $Id: nao.html,v 1.1 2002/08/07 08:09:24 dav480 Exp $