Skip to main content Accessibility help
×
Hostname: page-component-5c6d5d7d68-thh2z Total loading time: 0 Render date: 2024-08-17T02:15:42.813Z Has data issue: false hasContentIssue false

12 - Arrays

Published online by Cambridge University Press:  25 October 2009

D. B. Skillicorn
Affiliation:
Queen's University, Ontario
Get access

Summary

In this chapter we build a much more complex type, the type of arrays. The construction of arrays as a categorical data type is significantly different and more complex than the constructions seen so far, so this chapter illustrates new aspects of the construction technique.

Arrays are an important type because of the ubiquitous use of Cartesian coordinate systems and the huge edifice of linear algebra built on top of them. Almost all scientific and numeric computations require arrays as central data structures.

While the need for a data type of arrays is undisputed, there has always been some disagreement about exactly what arrays should represent: should the entries of an array all be of the same type (homogeneous) or might they be different (inhomogeneous); should extents be the same in each dimension (rectangular) or might they differ (ragged); are arrays of different sizes members of the same type or of different types. Different programming languages have answered these questions differently.

Arrays appeared early in languages such as Fortran, which had homogeneous, rectangular arrays but was ambivalent about how they should be typed. Arrays had to be declared with their shapes, and shapes of arguments and parameters had to agree (although some of these rules were relaxed later). Fortran even went so far as to reveal the storage allocation of arrays (by columns) at the language level.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 1994

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Arrays
  • D. B. Skillicorn, Queen's University, Ontario
  • Book: Foundations of Parallel Programming
  • Online publication: 25 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511526626.013
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Arrays
  • D. B. Skillicorn, Queen's University, Ontario
  • Book: Foundations of Parallel Programming
  • Online publication: 25 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511526626.013
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Arrays
  • D. B. Skillicorn, Queen's University, Ontario
  • Book: Foundations of Parallel Programming
  • Online publication: 25 October 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511526626.013
Available formats
×