More and more, researchers at SEP attempt to solve complex and large geophysical inversion problems. Consequently, to attack these problems efficiently, SEP needs sophisticated and reusable solvers. An object-oriented programming language enables us to hand an operator object (e.g. an NMO stacking routine) and a data object (e.g. a CMP gather) to a solver object (e.g. a conjugate gradient routine). The solver uses a defined set of abstract operations (methods) of the operator and the data to minimize the residual.
What are these abstract operations and why do we need
object orientation to implement them?
HCL requires that a vector performs all the operations
that are part of the algebraic vector
definition. For example,
a vector can add itself to another vector of the
same vector space or a vector can scale itself with a scalar.
Similarly, a HCL operator can apply itself to a compatible
input vector and return an output vector.
The curious phrase that
an inanimate vector ``adds itself'' or ``scales itself''
expresses that the object-oriented implementation of the addition
is carried by each object.
Object orientation allows us to wrap algorithms and data structures
into functional units, such as vectors that add themselves.
The solver does not need to know about the implementation details
of the vector's addition method,
but merely trusts that the standard Add() method invokes the
correct computations resulting in an addition.