Why matrix manipulation should be done in C++

  • Authors:
  • W. Douglas Maurer

  • Affiliations:
  • George Washington University, Washington, DC

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We show here how the technique of overloaded function call in C++ may be used in making matrix manipulations easier to understand, even when these involve specialized matrix representations. Such representations include sparse matrices, packed Boolean matrices, tridiagonal matrices, and arrays of pointers to arrays; and these may start with m00 or with m11. In all these cases, we may use the notation m (i, j) (with parentheses, not square brackets) to denote mij The overloaded function call is available in C++ and in no other language, and this is why matrix manipulation should be done in C++. In many cases an auxiliary construction, that of the reference class, is necessary in order to allow matrix elements to be changed as well as used.