-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Sometimes CLRS pseudocodes create empty matrices or tables (2D arrays):
- "let
Dbe a newn\times nmatrix" (page 772) - "let
m[1\subarr n, 1\subarr n]be a new table" (page 391)
Table elements are accessed using pairs of indices, e.g., m[i,j]. Matrix elements are accessed using lowercase letters with a pair of subscripts, e.g., d_{ij}.
We have a translation rule "let A[1\subarr n] be a new array" -> A = Array(1, n), and "A[i]" -> A[i].
Clarify how to translate the above examples. Explicitly add new translation rules for creation and accessors. Do we need a new Table type to encapsulate an Array of Arrays?
Moreover, sometimes arrays are also accessed with lowercase letters with a pair of subscripts, e.g., a_i. Do we need an explicit translation rule for it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels