class SGFSpace_d : public HCL_VectorSpace_d

SGFSpace objects define the geometry and attributes of uniform rectilinear grids


Inheritance:


Public Methods

int Dim () const
returns dimension = total number of samples
double Vol () const
returns volume of basic grid cell
SGFSpace_d* Intersect ( const SGFSpace_d & B ) const
intersection of this SGFSpace with another

Public

Constructors
SGFSpace_d ()
Default constructor
SGFSpace_d ( const SGFSpace_d & S )
Copy constructor
SGFSpace_d ( const char * fname, int dim=0 )
Usual constructor - reads grid parameter table from file
SGFSpace_d ( const AbstractTable & tbl, int dim=0 )
Constructor accepting externally constructed table
SGFSpace_d ( AbstractTable * tbl, int dim=0 )
Constructor accepting pointer to externally constructed table
~SGFSpace_d ()
Destructor
Access to header table
virtual int GetValue (const char *name, int &value) const
returns header word as int
virtual int GetValue (const char *name, double &value) const
returns header word as double
virtual int GetValue (const char *name, char *value, int length = 0) const
returns header word as character array
virtual int GetArrayValue (const char *name, int ind, int &value) const
virtual int GetArrayValue (const char *name, int ind, double &value) const
virtual int GetArrayValue (const char *name, int ind, char *value, int length = 0) const
virtual const AbstractTable& ParametersRef () const
returns const reference to table
virtual AbstractTable* Parameters () const
returns independent copy of table - uses new, so calling unit must manage storage

Inherited from HCL_VectorSpace_d:

Public Methods

virtual int operator == (const HCL_VectorSpace_d &) const
virtual int operator != (const HCL_VectorSpace_d & x) const
virtual HCL_Vector_d* Member() const
virtual HCL_VectorSpace_d* Replicate() const
int Test( int display = 0, double tol = 100 ) const

Inherited from HCL_Base:

Public Methods

void IncCount() const
void DecCount() const
int Count() const
virtual ostream& Write(ostream &) const

Documentation

SGFSpace objects define the geometry and attributes of uniform rectilinear grids. The class accomodates up to 9-dimensional data, and records its organization and any auxiliary scalar information required to properly interpret the data. Vectors in an SGFSpace are SGFVector_ds.

Motivated by and designed after the Stanford Exploration Project ``classic'' seismic disk data format. After seismic usage, grid geometry and auxiliary information are ``headers'' or ``header words'' in this documentation.

Double and single precision versions defined. The description below refers to the double precision class SGFSpace_d. In single precision, all doubles change to doubles, otherwise everything is the same. SGFSpace stores header words (grid parameters etc.) internally in a parameter table, which is an instance of an AbstractTable object. The table is read-only data: access is provided through a const reference (method ParametersRef()) and through returning a pointer to an independent copy (method Parameters()). Neither of these access methods permit the user to alter the parameters of the SGFSpace object. Creating a new SGFSpace with a new parameter table having only a few differences with that of the current SGFSpace - a fairly frequently occurring task - might be accomplished with code resembling this fragment:

 
AbstractTable * tnew = oldsp.Parameters();
tnew->PutValue("WineType","Beaujolais"); 
SGFSpace * newsp = new
SGFSpace(tnew); 
HCL_delete(tnew); 
Note that Parameters allocates storage, which the calling locus of control must manage.

Required header words:

Optional header words:

Notes:

Example: The following file, input to the SGFSpace usual constructor, constructs an SGFSpace implementing a 2-dimensional grid having additional attributes of WaterDepth and WineType.

Since no binary data filename appears (in=...), this file is suitable only to define an SGFSpace. A similar file specifying a vector in this space would include instead an actual filename (in=<filename>) as a ``pointer - to - data''.

  n1=101
  n2=201
  d1=0.01
  d2=27.9
  o1=0.0
  o2=34723.39487
  WaterDepth=154.5
  WineType=VinRougeOrdinaire
Constructors

SGFSpace_d()
Default constructor

SGFSpace_d( const SGFSpace_d & S )
Copy constructor

SGFSpace_d( const char * fname, int dim=0 )
Usual constructor - reads grid parameter table from file. Also permits user to override default dimension computation.

SGFSpace_d( const AbstractTable & tbl, int dim=0 )
Constructor accepting externally constructed table. Also permits user to override default dimension computation.

SGFSpace_d( AbstractTable * tbl, int dim=0 )
Constructor accepting pointer to externally constructed table. Also permits user to override default dimension computation.

~SGFSpace_d()
Destructor

Access to header table

virtual int GetValue(const char *name, int &value) const
returns header word as int

virtual int GetValue(const char *name, double &value) const
returns header word as double

virtual int GetValue(const char *name, char *value, int length = 0) const
returns header word as character array

virtual int GetArrayValue(const char *name, int ind, int &value) const

virtual int GetArrayValue(const char *name, int ind, double &value) const

virtual int GetArrayValue(const char *name, int ind, char *value, int length = 0) const

virtual const AbstractTable& ParametersRef() const
returns const reference to table

virtual AbstractTable* Parameters() const
returns independent copy of table - uses new, so calling unit must manage storage

int Dim() const
returns dimension = total number of samples

double Vol() const
returns volume of basic grid cell

SGFSpace_d* Intersect( const SGFSpace_d & B ) const
intersection of this SGFSpace with another. Nonvoid return if grids are compatible (same increments dx, origins ox differ by integer multiples of increments).


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de