RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
slbm::QueryProfile Class Reference

An InterpolatedProfile object that also has information about the the P and S wave velocity as a function of depth for all layers, and the velocity gradient in the mantle. More...

#include <QueryProfile.h>

Inheritance diagram for slbm::QueryProfile:
slbm::InterpolatedProfile

Public Member Functions

 QueryProfile (Grid &grid, Location &location)
 Parameterized constructor. More...
 
 QueryProfile (const QueryProfile &QueryProfile)
 Copy constructor. More...
 
 ~QueryProfile ()
 
QueryProfileoperator= (const QueryProfile &other)
 Equal operator. More...
 
bool operator== (const QueryProfile &other)
 Equality operator. More...
 
bool operator!= (const QueryProfile &other)
 Inequality operator. More...
 
int nIntervals ()
 Retrieve the number of intervals associated with this Profile. More...
 
void getData (int *nodeIds, double *coefficients, int &nNeighbors, double *depths, double *pvelocities, double *svelocities, double &pgradient, double &sgradient)
 Retrieve all the interval depth and velocity information contained in this QueryProfile object. More...
 
vector< int > & getNodeIds ()
 
double * getDepth ()
 Retrieve the depth of the top of the k'th interval, in km. More...
 
double * getVelocity (const int &waveType)
 Retrieve the P or S wave velocity of the k'th interval, in km/sec. More...
 
double * getMantleGradient ()
 Retrieve the P or S wave velocity gradient, in 1/sec. More...
 
string toString ()
 Returns a formatted string containing detailed information about this Profile. More...
 
- Public Member Functions inherited from slbm::InterpolatedProfile
 InterpolatedProfile ()
 Default constructor. More...
 
 InterpolatedProfile (Grid &grid, Location &location)
 Parameterized constructor. More...
 
 InterpolatedProfile (const InterpolatedProfile &other)
 Copy constructor. More...
 
virtual ~InterpolatedProfile ()
 Destructor. More...
 
InterpolatedProfileoperator= (const InterpolatedProfile &other)
 Equal operator. More...
 
bool operator== (const InterpolatedProfile &other)
 Equality operator. More...
 
bool operator!= (const InterpolatedProfile &other)
 Inequality operator. More...
 
int getNCoefficients ()
 
vector< GridProfile * > & getNodes ()
 Retrieve a list of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
GridProfilegetNode (const int &i)
 
vector< int > & getNodeIds ()
 
int getNodeId (const int &i)
 
vector< double > & getCoefficients ()
 Retrieve the interpolation coefficients that define the dependency of this InterpolatedProfile on its neighbors. More...
 
double getCoefficient (const int &i)
 
void getNodeIds (int *nodeIds, int &size)
 Retrieve the ID numbers of the GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
 
void getCoefficients (double *coeff, int &size)
 Retrieve the interpolation coefficients that were applied to the neighboring GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
 
void getWeights (int *nodeIds, double *coeff, int &size)
 
void interpRadius (const int &k, double &radius)
 Calculate a single radius value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpDepth (const int &k, double &depth)
 Calculate a single depth value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpVelocity (const int &type, const int &k, double &velocity)
 Calculate a single velocity value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpGradient (const int &type, double &gradient)
 Calculate a single gradient value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
bool isActiveProfile ()
 Returns true if all of the neighboring GridProfile objects. More...
 
virtual size_t memSize ()
 

Static Public Member Functions

static int getClassCount ()
 
- Static Public Member Functions inherited from slbm::InterpolatedProfile
static int getClassCount ()
 

Additional Inherited Members

- Protected Attributes inherited from slbm::InterpolatedProfile
vector< GridProfile * > nodes
 An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
vector< int > nodeIds
 An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
vector< double > coefficients
 The interpolation coefficients which should be applied to this InterpolatedProfile's neighbors in order to compute interpolated quantities. More...
 
- Static Protected Attributes inherited from slbm::InterpolatedProfile
static int interpolatedProfileClassCount
 

Detailed Description

An InterpolatedProfile object that also has information about the the P and S wave velocity as a function of depth for all layers, and the velocity gradient in the mantle.

The QueryProfile class represents a Profile based on depth, velocity and gradient values interpolated from values of nearby GridProfile objects. The simplest way to obtain a QueryProfile object is to call Grid::getQueryProfile().

Definition at line 59 of file QueryProfile.h.

Constructor & Destructor Documentation

◆ QueryProfile() [1/2]

slbm::QueryProfile::QueryProfile ( Grid grid,
Location location 
)

Parameterized constructor.

Parameterized constructor that builds a QueryProfile object based on values interpolated from nearby GridProfile objects.

Parameters
grida reference to the Grid object. Grid::findProfile() will be called to retrieve the neighbors and interpolation coefficients.
locationthe Location of the query position.

◆ QueryProfile() [2/2]

slbm::QueryProfile::QueryProfile ( const QueryProfile QueryProfile)

Copy constructor.

Copy constructor.

◆ ~QueryProfile()

slbm::QueryProfile::~QueryProfile ( )

Member Function Documentation

◆ getClassCount()

static int slbm::QueryProfile::getClassCount ( )
static

◆ getData()

void slbm::QueryProfile::getData ( int *  nodeIds,
double *  coefficients,
int &  nNeighbors,
double *  depths,
double *  pvelocities,
double *  svelocities,
double &  pgradient,
double &  sgradient 
)
inline

Retrieve all the interval depth and velocity information contained in this QueryProfile object.

Retrieve all the interval depth and velocity information contained in this QueryProfile object.

Definition at line 185 of file QueryProfile.h.

◆ getDepth()

double* slbm::QueryProfile::getDepth ( )
inline

Retrieve the depth of the top of the k'th interval, in km.

Retrieve the depth of the top of the k'th interval, in km.

Definition at line 129 of file QueryProfile.h.

◆ getMantleGradient()

double* slbm::QueryProfile::getMantleGradient ( )
inline

Retrieve the P or S wave velocity gradient, in 1/sec.

Retrieve the P or S wave velocity gradient, in 1/sec.

Definition at line 140 of file QueryProfile.h.

◆ getNodeIds()

vector<int>& slbm::QueryProfile::getNodeIds ( )
inline

Definition at line 124 of file QueryProfile.h.

◆ getVelocity()

double* slbm::QueryProfile::getVelocity ( const int &  waveType)
inline

Retrieve the P or S wave velocity of the k'th interval, in km/sec.

Retrieve the P or S wave velocity of the k'th interval, in km/sec.

Definition at line 134 of file QueryProfile.h.

◆ nIntervals()

int slbm::QueryProfile::nIntervals ( )
inline

Retrieve the number of intervals associated with this Profile.

Retrieve the number of intervals associated with this Profile.

Definition at line 106 of file QueryProfile.h.

◆ operator!=()

bool slbm::QueryProfile::operator!= ( const QueryProfile other)
inline

Inequality operator.

Inequality operator.

Definition at line 101 of file QueryProfile.h.

◆ operator=()

QueryProfile& slbm::QueryProfile::operator= ( const QueryProfile other)

Equal operator.

Equal operator.

◆ operator==()

bool slbm::QueryProfile::operator== ( const QueryProfile other)

Equality operator.

Equality operator.

◆ toString()

string slbm::QueryProfile::toString ( )

Returns a formatted string containing detailed information about this Profile.

Returns a formatted string containing detailed information about this Profile.


The documentation for this class was generated from the following file: