previous up next print clean
Next: SPACE Up: C++ in physical science: Previous: The C++ language


Linear operators can be regarded as matrices. We do not handle them as matrices because their application as a matrix multiply would be unnecessarily inefficient (e.g. discrete Fourier transform) or their storage as a matrix would be unnecessarily large (e.g. partial differential equations.) Our operators are not represented as matrices -- we define them procedurally by a computer subroutine pair. The first subroutine is equivalent to the matrix multiplication,

\bold A \bold x.\end{displaymath}

The conjugate subroutine computes

\bold A^{\dagger} \bold y,\end{displaymath}

where $\bold A^{\dagger}$ is the (complex conjugate) transpose matrix.

When we solve a problem involving the operator both the operator and its conjugate are often required. Solution methods generally fail if the practitioner provides an inconsistent pair of subroutines. This can be checked by using the dot-product test as described in the appendix. Thus the coding of any operator is not finished until a dot-product test has been passed.

All our operators will be defined by the parameters used in creating the particular instance of an operator and the two procedures that apply the forward and conjugate transforms. For instance, a convolution operator is passed an array defining the filter in its constructor. The forward procedure convolves with the filter and the conjugate procedure correlates with the filter. In our C++ code the base operator class ``${\tt <type\gt op}$'' defines a single operator that is designed to be applied to a single space.

The well known word ``space'' can lead to considerable confusion because there are many entities that are described as spaces, these include continuous spaces, discrete sampled spaces, abstract infinite vector spaces etc. In our C++ code the ``${\tt <type\gt space}$'' class describes objects that are a discrete sampling of a physical space. The word ``${\tt <type\gt}$'' defines the numerical type of the elements of the space, currently ${\tt 
floatspace}$ and ${\tt complexspace}$ are supported space types.

An abstract space in a numerical problem is a collection of values that could be a single physical space (a single instance of the ${\tt <type\gt space}$ class), or an assemblage of physical spaces. In our C++ code such assemblages are called ``${\tt <type\gt spacearray}$'', i.e. an array of ${\tt <type\gt space}$ objects. In this paper we will use the word space to refer to the abstract concept and ${\tt <type\gt space}$ or ${\tt <type\gt spacearray}$ when we wish to refer to a particular representation of a space.

An object of class ``${\tt <type\gt oparray}$'' is an array of ${\tt <type\gt op}$ objects that is designed to be applied to an object of class ${\tt <type\gt spacearray}$. An array of operators is a generalization of the concept of operator, it is analogous to the idea of partitioned matrices. It differs in that the partitions in the operator array are procedurally defined. Our C++ classes define space-arrays and operator-arrays as new C++ classes.

previous up next print clean
Next: SPACE Up: C++ in physical science: Previous: The C++ language
Stanford Exploration Project