O'Reilly logo

Java™ Number Cruncher: The Java Programmer's Guide to Numerical Computing by Ronald Mak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Basic Matrix Operations

Even the most basic matrix operations of addition, subtraction, and, especially, multiplication can put a strain on a computer's computational capabilities. The matrix operands do not have to be very big before they generate large numbers of individual floating-point operations. This is prime breeding ground for accumulated roundoff errors.

In this chapter, we'll begin to develop the numbercruncher.matrix package. Its classes include Matrix, SquareMatrix, IdentityMatrix, RowVector, and ColumnVector. We'll add class LinearSystem for solving systems of simultaneous linear equations in Chapter 10 and class InvertibleMatrix in Chapter 11. Figure 9-1 shows the inheritance tree for these classes.[1]

Figure 9-1. The inheritance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required