previous up next print clean
Next: Regularly sampled function Up: PROGRAMMING ALGEBRA Previous: PROGRAMMING ALGEBRA

Vectors

In Jag, data, such as a seismic CMP gather, is represented as a Vector and a Space object. Any object of the Vector class implements the abstract algebraic definition of a Hilbert vector. Fundamentally, a Hilbert vector is able to add another (compatible) vector to itself, to scale itself by a given scalar, and to compute the inner product between itself and another vector. A Jag vector also contains a reference to its corresponding vector space object. Figure 2 shows the HTML documentation page for Jag's Vector interface. A Java utility program, Javadoc, generates such pages from an author's comments in the Java source file.

 
javadocVector
javadocVector
Figure 2
Javadoc, a Java utility program, generates HTML pages from Java interface and class files. The Vector HTML page lists the methods that a programmer needs to supply for each implementation of the Vector interface, such as an Rsf. Type declarations are hyperlinks to the type's Javadoc HTML page. This Figure shows only part of the more detailed original HTML page.
view

Any object of the Space class represents an abstract algebraic space. A Jag programmer can query if a given vector is a member of the space, or if another space is equal. A programmer can also request from a Space object to return a new vector member.

While it is true that most Jag vectors will store their data as an array of numbers and will represent their space as an array of axes or a set of key values, the notion of Jag vectors is not limited to such implementations. As we will discuss later, the vector and space classes are interfaces and Jag only specifies their method invocations.



 
previous up next print clean
Next: Regularly sampled function Up: PROGRAMMING ALGEBRA Previous: PROGRAMMING ALGEBRA
Stanford Exploration Project
11/11/1997