next up previous print clean
Next: Operator Up: Inversion objects Previous: Inversion objects

Vector objects

Vectors are simply a stream of numbers that exist in some space. The base vector class is SEP.vec_base.vector. The base class defines a series of functions that must be overridden by its children.
Return a copy of the vector.
Return a copy of the space the vector exists in.
Zero the vector.
Put random numbers into the vector.
Scale the vector by the number val.
Add vec to the vector.
Scale the vector by scale1 and then add vec scaled by scale2.
Multiply the vector by the vector vec.
Return the dot product of the vector with the vector vec.
Load the vector name.
Return the size of the vector.
Clean the vector, remove it from memory and/or disk.

The SEP.vec_super.vector class is derived from the SEP.vec_base.vector class. It is simply a collection of more than one vector. It applies all mathematical operations on each vector independently.

The SEP.vec_oc.vector class is an out-of-core vector that exists in a file. The SEP.vec_sep.vector class is inherited from the SEP.vec_oc.vector class and the SEP.sepfile.sep_file class. It is vectors that are stored in SEPlib files. It uses the SEPlib program Solver_ops to perform mathematical operations. The SEP.vec_oc.vector should not be used by a programmer because the data type (complex or float) has not been defined. The SEP.vec_sfloat.vector and SEP.vec_scmplx.vector classes define the float and complex version of the a SEP out-of-core dataset.

There are six additional vector classes for use with parallel jobs. The current inheritance tree for the vector is shown in Figure [*]. The SEP.pv_copy.cmplx_vector and SEP.pv_copy.float_vector classes are for files that are shared among the nodes (derived from the SEP.pf_copy.parfile) class and are distributed and collected, before and after each parallel operation. The SEP.pv_spli.cmplx_vector and SEP.pv_spli.float_vector vectors are also distributed and collected, but are split among the nodes and inherited from SEP.pf_split.parfile. The final two vectors, SEP.pv_always_split.cmplx_vector and SEP.pv_always_split.float_vector, also inherit from the SEP.pf_split.parfile class. These two classes are never collected or distributed and exist solely on the nodes. Parallel operators using these vector need to be derived from the SEP.pj_split.par_job class. Mathematical operations are done in parallel using the Solver_ops_split program.

Figure 2
Vector inheritance tree.

next up previous print clean
Next: Operator Up: Inversion objects Previous: Inversion objects
Stanford Exploration Project