Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-vpsfw Total loading time: 0 Render date: 2024-07-22T14:19:35.671Z Has data issue: false hasContentIssue false

Chapter 9 - Arrays and matrices

Published online by Cambridge University Press:  05 June 2012

David Yevick
Affiliation:
University of Waterloo, Ontario
Get access

Summary

In this and the following chapter, arrays, references and pointers are examined. These will prove essential to a more detailed discussion of objects and classes.

Data structures and arrays

An array constitutes a built-in (e.g. native to the compiler) data structure, which denotes a collection of related quantities with common ordering properties. Each object in an array must be of the same type and is accessible through an integer index. Other commonly occurring data structures include the following.

  1. A bag – an unordered collection of objects.

  2. A set – a bag in which no object can appear more than once.

  3. A list – an object sequence that enables navigation between an object and its successor.

  4. An ordered list – a list with the property that an object can be accessed through its position as well as by way of the neighboring object.

  5. A sorted list – a list with elements stored according to a given ordering operation.

  6. A key set an object collection that employs a key such as a word or number to locate elements.

  7. A stack – a container for which elements can be added or removed only at the first (top) position; that is, only the last element to be added is accessible at any given time.

  8. A queue – a container constructed such that only the oldest (first) element in the container can be removed at any given time.

Type
Chapter
Information
A Short Course in Computational Science and Engineering
C++, Java and Octave Numerical Programming with Free Software Tools
, pp. 83 - 92
Publisher: Cambridge University Press
Print publication year: 2012

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 and matrices
  • David Yevick, University of Waterloo, Ontario
  • Book: A Short Course in Computational Science and Engineering
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139022262.009
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 and matrices
  • David Yevick, University of Waterloo, Ontario
  • Book: A Short Course in Computational Science and Engineering
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139022262.009
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 and matrices
  • David Yevick, University of Waterloo, Ontario
  • Book: A Short Course in Computational Science and Engineering
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139022262.009
Available formats
×