Abstract
Linear algebra calculations—i.e. operations on vectors and matrices—are at the heart of many scientific computing application codes. In this chapter we will apply the ideas introduced earlier in this book to begin to develop a collection of classes that allow us to perform these calculations. We will describe the design of a class of vectors in the body of this chapter. Appropriate constructors and destructors will ensure that memory is managed correctly, and operator overloading will allow operations between vectors and matrices (such as addition, subtraction and multiplication) to be coded in a natural manner. The exercises at the end of the chapter will focus on developing this class further, developing a companion class of matrices, and developing a linear system class that allows us to solve matrix equations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2012 Springer-Verlag London Limited
About this chapter
Cite this chapter
Pitt-Francis, J., Whiteley, J. (2012). Developing Classes for Linear Algebra Calculations. In: Guide to Scientific Computing in C++. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-4471-2736-9_10
Download citation
DOI: https://doi.org/10.1007/978-1-4471-2736-9_10
Publisher Name: Springer, London
Print ISBN: 978-1-4471-2735-2
Online ISBN: 978-1-4471-2736-9
eBook Packages: Computer ScienceComputer Science (R0)