SLBM  3.0
Regional Seismic Travel Time
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
slbm::InterpolatedProfile Class Reference

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

#include <InterpolatedProfile.h>

Inherited by slbm::CrustalProfile, slbm::LayerProfile, and slbm::QueryProfile.

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

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.

Constructor & Destructor Documentation

slbm::InterpolatedProfile::InterpolatedProfile ( )

Default constructor.

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

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
slbm::InterpolatedProfile::InterpolatedProfile ( const InterpolatedProfile other)

Copy constructor.

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

Destructor.

Member Function Documentation

static int slbm::InterpolatedProfile::getClassCount ( )
static
double slbm::InterpolatedProfile::getCoefficient ( const int &  i)
inline
vector<double>& slbm::InterpolatedProfile::getCoefficients ( )
inline

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.

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. 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.

int slbm::InterpolatedProfile::getNCoefficients ( )
inline
GridProfile* slbm::InterpolatedProfile::getNode ( const int &  i)
inline
int slbm::InterpolatedProfile::getNodeId ( const int &  i)
inline
vector<int>& slbm::InterpolatedProfile::getNodeIds ( )
inline
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. 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.

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

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

void slbm::InterpolatedProfile::getWeights ( int *  nodeIds,
double *  coeff,
int &  size 
)
inline
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.

Parameters
kthe interval id of the desired radius.
depththe interpolated depth value, in km.
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.

Parameters
typeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
gradientthe interpolated gradient value, in 1/sec.
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.

Parameters
kthe interval id of the desired radius.
radiusthe interpolated radius value, in km.
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.

Parameters
typeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
kthe interval id of the desired velocity.
velocitythe interpolated velocity value, in km/sec.
bool slbm::InterpolatedProfile::isActiveProfile ( )
inline

are active nodes.

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

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

Inequality operator.

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

Equal operator.

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

Equality operator.

Member Data Documentation

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

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

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

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

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

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


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