Multi-dimensional Arrays with Levels

05/01/2020
by   Artjoms {Š}inkarovs, et al.
0

We explore a data structure that generalises rectangular multi-dimensional arrays. The shape of an n-dimensional array is typically given by a tuple of n natural numbers. Each element in that tuple defines the length of the corresponding axis. If we treat this tuple as an array, the shape of that array is described by the single natural number n. A natural number itself can be also treated as an array with the shape described by the natural number 1 (or the element of any singleton set). This observation gives rise to the hierarchy of array types where the shape of an array of level l+1 is a level-l array of natural numbers. Such a hierarchy occurs naturally when treating arrays as containers, which makes it possible to define both rank- and level-polymorphic operations. The former can be found in most array languages, whereas the latter gives rise to partial selections on a large set of hyperplanes, which is often useful in practice. In this paper we present an Agda formalisation of arrays with levels. We show that the proposed formalism supports standard rank-polymorphic array operations, while type system gives static guarantees that indexing is within bounds. We generalise the notion of ranked operator so that it becomes applicable on arrays of arbitrary levels and we show why this may be useful in practice.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/10/2017

A Lambda Calculus for Transfinite Arrays: Unifying Arrays and Streams

Array programming languages allow for concise and generic formulations o...
research
03/19/2023

Sparse Partial-Tracing

Matrices and more generally multidimensional arrays, form the backbone o...
research
08/20/2022

Study of Novel Sparse Array Design Based on the Maximum Inter-Element Spacing Criterion

A novel sparse array (SA) structure is proposed based on the maximum int...
research
01/18/2020

AI Data Wrangling with Associative Arrays

The AI revolution is data driven. AI "data wrangling" is the process by ...
research
08/27/2020

Gridless Multidimensional Angle of Arrival Estimation for Arbitrary 3D Antenna Arrays

A full multi–dimensional characterization of the angle of arrival (AoA) ...
research
01/24/2023

Relation-Algebraic Verification of Disjoint-Set Forests

This paper studies how to use relation algebras, which are useful for hi...
research
12/18/2007

A Class of LULU Operators on Multi-Dimensional Arrays

The LULU operators for sequences are extended to multi-dimensional array...

Please sign up or login with your details

Forgot password? Click here to reset