Home >  Term: array
array

An assemblage of items that are randomly accessible by integers, the index. Formal Definition: Ignoring size an array may be seen as an abstract data type with the operations new(), set(i, v, A), and get(i, A), where i is a numeric index, v is a value, and A is an array. The operations may be defined with axiomatic semantics as follows.

  1. new() returns an array
  2. get(i, set(i, v, A)) = v
  3. get(i, set(j, v, A)) = get(i, A) if i ≠ j
Compare this with a dictionary using integers as keys.

0 0

Kūrėjas

  • GeorgeV
  •  (Gold) 1123 points
  • 100% positive feedback
© 2024 CSOFT International, Ltd.