Frame

From APL Wiki
Revision as of 15:23, 20 November 2019 by RichPark (talk | contribs) (1 revision imported: Migrate from miraheze)
Jump to navigation Jump to search

In leading axis theory, the frame is an abstract array-like structure which organizes the k-cells of an array. For k-cells of an array with rank r, the frame consists of the first r-k axes of the array. The frame concept is most used in working with the Rank operator, or function rank: it is shared between the arguments and result of a function with rank. A concrete array which shares the frame's structure can be produced by applying Enclose or Box with rank k to an array. When representing arrays as nested lists as in K, this array already exists: simply consider the first r-k levels of nesting to be the array, whose contents are cells.

The frame is complementary to the cell shape for cells of a particular rank: while the frame occupies leading axes (and its shape is a prefix of the array's shape), the cell shape is derived from the trailing axes, so that every axis belongs to either the frame or the cells.