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

A Profile object based on values interpolated from nearby GridProfile objects. More...

#include <InterpolatedProfile.h>

Inheritance diagram for slbm::InterpolatedProfile:
slbm::CrustalProfile slbm::LayerProfile slbm::QueryProfile slbm::LayerProfileG

Public Member Functions

 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 ()
 

Protected Attributes

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

static int interpolatedProfileClassCount
 

Detailed Description

A Profile object based on values interpolated from nearby GridProfile objects.

The InterpolatedProfile class represents a Profile based on depth, velocity and gradient values interpolated from values from nearby GridProfile objects.

An InterpolatedProfile object is not particularly useful since it does not own any containers to store depth, velocity and gradient information. CrustalProfile, LayerProfile and QueryProfile objects are derived off of InterpolatedProfile class and provide that functionality.

Definition at line 56 of file InterpolatedProfile.h.

Constructor & Destructor Documentation

◆ InterpolatedProfile() [1/3]

slbm::InterpolatedProfile::InterpolatedProfile ( )

Default constructor.

Default constructor.

◆ InterpolatedProfile() [2/3]

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

Parameterized constructor.

Parameterized constructor that sets up a Profile 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 where the profile is to be constructed

◆ InterpolatedProfile() [3/3]

slbm::InterpolatedProfile::InterpolatedProfile ( const InterpolatedProfile other)

Copy constructor.

Copy constructor.

◆ ~InterpolatedProfile()

virtual slbm::InterpolatedProfile::~InterpolatedProfile ( )
virtual

Destructor.

Destructor.

Member Function Documentation

◆ getClassCount()

static int slbm::InterpolatedProfile::getClassCount ( )
static

◆ getCoefficient()

double slbm::InterpolatedProfile::getCoefficient ( const int &  i)
inline

Definition at line 134 of file InterpolatedProfile.h.

◆ getCoefficients() [1/2]

vector<double>& slbm::InterpolatedProfile::getCoefficients ( )
inline

Retrieve the interpolation coefficients that define the dependency of this InterpolatedProfile on its neighbors.

Retrieve the interpolation coefficients that define the dependency of this InterpolatedProfile on its neighbors. The calling application is given a const reference to the double array of values owned by this InterpolatedProfile object. There will be SLBMGlobals::nCoefficients elements.

Definition at line 132 of file InterpolatedProfile.h.

◆ getCoefficients() [2/2]

void slbm::InterpolatedProfile::getCoefficients ( double *  coeff,
int &  size 
)
inline

Retrieve the interpolation coefficients that were applied to the neighboring GridProfiles that contributed to the interpolated values at this InterpolatedProfile object.

Retrieve the interpolation coefficients that were applied to the neighboring GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. It is the responsibility of the caller to supply a double array large enough to hold the requested values. There will be SLBMGlobals::nCoefficients elements.

Definition at line 258 of file InterpolatedProfile.h.

◆ getNCoefficients()

int slbm::InterpolatedProfile::getNCoefficients ( )
inline

Definition at line 109 of file InterpolatedProfile.h.

◆ getNode()

GridProfile* slbm::InterpolatedProfile::getNode ( const int &  i)
inline

Definition at line 118 of file InterpolatedProfile.h.

◆ getNodeId()

int slbm::InterpolatedProfile::getNodeId ( const int &  i)
inline

Definition at line 122 of file InterpolatedProfile.h.

◆ getNodeIds() [1/2]

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

Definition at line 120 of file InterpolatedProfile.h.

◆ getNodeIds() [2/2]

void slbm::InterpolatedProfile::getNodeIds ( int *  nodeIds,
int &  size 
)
inline

Retrieve the ID numbers of the GridProfiles that contributed to the interpolated values at this InterpolatedProfile object.

Retrieve the ID numbers of the GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. It is the responsibility of the caller to supply an int array large enough to hold the requested values. There will be SLBMGlobals::nCoefficients elements.

Definition at line 251 of file InterpolatedProfile.h.

◆ getNodes()

vector<GridProfile*>& slbm::InterpolatedProfile::getNodes ( )
inline

Retrieve a list of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

Retrieve a list of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

Definition at line 116 of file InterpolatedProfile.h.

◆ getWeights()

void slbm::InterpolatedProfile::getWeights ( int *  nodeIds,
double *  coeff,
int &  size 
)
inline

Definition at line 241 of file InterpolatedProfile.h.

◆ interpDepth()

void slbm::InterpolatedProfile::interpDepth ( const int &  k,
double &  depth 
)
inline

Calculate a single depth value based on the neighboring GridProfile objects and the interpolation coefficients.

Calculate a single depth value based on the neighboring GridProfile objects and the interpolation coefficients.

Parameters
kthe interval id of the desired radius.
depththe interpolated depth value, in km.

Definition at line 272 of file InterpolatedProfile.h.

◆ interpGradient()

void slbm::InterpolatedProfile::interpGradient ( const int &  type,
double &  gradient 
)
inline

Calculate a single gradient value based on the neighboring GridProfile objects and the interpolation coefficients.

Calculate a single gradient value based on the neighboring GridProfile objects and the interpolation coefficients.

Parameters
typeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
gradientthe interpolated gradient value, in 1/sec.

Definition at line 286 of file InterpolatedProfile.h.

◆ interpRadius()

void slbm::InterpolatedProfile::interpRadius ( const int &  k,
double &  radius 
)
inline

Calculate a single radius value based on the neighboring GridProfile objects and the interpolation coefficients.

Calculate a single radius value based on the neighboring GridProfile objects and the interpolation coefficients.

Parameters
kthe interval id of the desired radius.
radiusthe interpolated radius value, in km.

Definition at line 265 of file InterpolatedProfile.h.

◆ interpVelocity()

void slbm::InterpolatedProfile::interpVelocity ( const int &  type,
const int &  k,
double &  velocity 
)
inline

Calculate a single velocity value based on the neighboring GridProfile objects and the interpolation coefficients.

Calculate a single velocity value based on the neighboring GridProfile objects and the interpolation coefficients.

Parameters
typeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
kthe interval id of the desired velocity.
velocitythe interpolated velocity value, in km/sec.

Definition at line 279 of file InterpolatedProfile.h.

◆ isActiveProfile()

bool slbm::InterpolatedProfile::isActiveProfile ( )
inline

Returns true if all of the neighboring GridProfile objects.

are active nodes.

Returns true if all of the neighboring GridProfile objects are active nodes.

Definition at line 293 of file InterpolatedProfile.h.

◆ memSize()

virtual size_t slbm::InterpolatedProfile::memSize ( )
virtual

◆ operator!=()

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

Inequality operator.

Inequality operator.

Definition at line 107 of file InterpolatedProfile.h.

◆ operator=()

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

Equal operator.

Equal operator.

◆ operator==()

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

Equality operator.

Equality operator.

Member Data Documentation

◆ coefficients

vector<double> slbm::InterpolatedProfile::coefficients
protected

The interpolation coefficients which should be applied to this InterpolatedProfile's neighbors in order to compute interpolated quantities.

The interpolation coefficients which should be applied to this InterpolatedProfile's neighbors in order to compute interpolated quantities.

Definition at line 231 of file InterpolatedProfile.h.

◆ interpolatedProfileClassCount

int slbm::InterpolatedProfile::interpolatedProfileClassCount
staticprotected

Definition at line 210 of file InterpolatedProfile.h.

◆ nodeIds

vector<int> slbm::InterpolatedProfile::nodeIds
protected

An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

Definition at line 224 of file InterpolatedProfile.h.

◆ nodes

vector<GridProfile*> slbm::InterpolatedProfile::nodes
protected

An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent.

Definition at line 217 of file InterpolatedProfile.h.


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