Next: Why Java?
Up: WHY OBJECT ORIENTATION?
Previous: Encapsulation
Inheritance allows a programmer of an object-oriented
class hierarchy to share code: any subclass inherits
all methods and variables of its super class. The subclass
may overwrite the inherited methods or use them unmodified.
In Jag, linear operators inherit almost all their methods
from a super class SepLinearOperator. A programmer usually only
implements the operator-specific parts, such as
- the constructors, which cannot be inherited,
- the apply() method, which implements the forward and
adjoint operation, and
- the toString() method, which returns a Java string representation
of the object.
SepLinearOperator supplies methods to image the operator or to access
the operators adjoint, its gradient, its Hessian, and more.
Next: Why Java?
Up: WHY OBJECT ORIENTATION?
Previous: Encapsulation
Stanford Exploration Project
11/11/1997