Fermi Physics Class Libraries Module: Linear Algebra

# ZOOM LinearAlgebra

The ZOOM LinearAlgebra package is meant to provide matrix operations without undue inefficency when the matrices are moderately small. It also allows for flexible changing of matrix shapes, and supports the concept of a "model" to represent specialized matrices.

This package provides: For example, SymmetricMatrix is a model to represent symmetric matrices, taking advantage of the symmetry wherever possible.meet the needs of Run II (D0 and CDF) offline (and possibly higher-level online) code for a unified message logging and statistics facility.

• The usual matrix arithmetic operations
• INversion and solving
• Eigen-analysis
• Models for SymmetricMatrix and various small square matrices up to 6x6
• A prescription for supporters to add new matrix models (for example SymmetricMat5x5 or OrthogonalMatrix) if beneficial

Some design points of this package are

• The "data-model" concept is realized via a letter-envelope idiom. The Matrix itself does not contain its data; it contains a pointer to an object that holds its data and knows how to implement matrix operations. This allows for flexibility in altering data models.
• "Lazy evaluation" to avoid unnecessary operations.
• Indirect accessor methods to support a uniform element access syntax despite potentially different actual data representations.
• "Double-dispatching" for methods, which allows the implementation to take advantage of specialized properties of all the matrices in an expression.

## Documentation

User's Guide (postscript)

User's Guide (pdf)

Design Notes (postscript)

Design Notes (pdf)

## LinearAlgebra or CLHEP Matrix?

ZOOM supports both, and it is our policy NOT to recommend one over the other.

### Completeness

The LinearAlgebra package overlaps in funtionallity with the CLHEP Matrix package. In fact, although the syntax in CLHEP may in some places look contrived (for instance, M[a][b] is zero-based while M(a,b) is one-based!) both packages implement all the usual (and most of the esoteric) linear algebra algortihms one is likely to need. There is littel to choose between them on that score.