GeoTessCPP  2.2
Software to facilitate storage and retrieval of 3D information about the Earth.
Public Member Functions | Static Public Member Functions | List of all members
geotess::GeoTessProfileNPoint Class Reference

A Profile object consisting of N monotonically increasing radii that span the radial extent of a layer, and an equal number of Data objects that define the model values at the corresponding positions. More...

#include <GeoTessProfileNPoint.h>

Inheritance diagram for geotess::GeoTessProfileNPoint:
geotess::GeoTessProfile

Public Member Functions

 GeoTessProfileNPoint (float *r, GeoTessData **dat, int size)
 Standard constructor. More...
 
 GeoTessProfileNPoint (const vector< float > &r, vector< GeoTessData * > &d)
 Standard constructor. More...
 
 GeoTessProfileNPoint (float *rad, const vector< GeoTessData * > &dat)
 Standard constructor. More...
 
virtual int class_size () const
 Returns the class size. More...
 
virtual GeoTessData ** getData ()
 Retrieve a shallow copy of the array of Data objects associated with this Profile. More...
 
virtual GeoTessDatagetData (int i)
 Retrieve a reference the i'th Data object. More...
 
virtual const GeoTessDatagetData (int i) const
 Retrieve a reference the i'th Data object. More...
 
virtual const GeoTessDatagetDataBottom () const
 Get the Data object at the bottom of the profile. More...
 
virtual GeoTessDatagetDataBottom ()
 Get the Data object at the bottom of the profile. More...
 
virtual const GeoTessDatagetDataTop () const
 Get the Data object at the top of the profile. More...
 
virtual GeoTessDatagetDataTop ()
 Get the Data object at the top of the profile. More...
 
virtual double getInterpolationCoefficient (int index, double radius) const
 Finds interpolation coefficient at the iput radius constrained to lie between radii[index] and radii[index + 1]. More...
 
virtual double getInterpolationCoefficient (int index, double radius, bool allowOutOfRange) const
 find interpolation coefficient using linear interpolation. More...
 
virtual LONG_INT getMemory ()
 
virtual int getNData () const
 Get the number of Data objects that comprise this profile. More...
 
virtual int getNRadii () const
 Get the number of radii that comprise this profile. More...
 
virtual float * getRadii ()
 Retrieve a copy of the array of radii values in km. More...
 
virtual float getRadius (int i) const
 Get the i'th radius value in this profile in km. More...
 
virtual float getRadiusBottom () const
 Get the radius at the bottom of the profile, in km. More...
 
virtual int getRadiusIndex (double radius, int jlo) const
 Find index i such that x is >= xx[i] and < xx[i+1]. More...
 
virtual float getRadiusTop () const
 Get the radius at the top of the profile, in km. More...
 
virtual const GeoTessProfileTypegetType () const
 Returns ProfileType (NPOINT). More...
 
virtual double getValue (int attributeIndex, int radiusIndex) const
 Retrieve the value of the specified attributes at the specified radius index. More...
 
virtual double getValue (const GeoTessInterpolatorType &radialType, int attributeIndex, double radius, bool allowRadiusOutOfRange) const
 Retrieve the value of the specified attribute interpolated at the specified radius. More...
 
virtual double getValueTop (int attributeIndex) const
 Retrieve the value of the specified attribute at the top of the layer. More...
 
bool isNaN (int nodeIndex, int attributeIndex)
 Return true if the specified Data value is NaN. More...
 
virtual bool operator== (const GeoTessProfile &p) const
 Return true if the input Profile object (p) equals this Profile object. More...
 
virtual void setData (const vector< GeoTessData * > &inData)
 Resets the data object to the new input data. More...
 
virtual void setData (int index, GeoTessData *inData)
 Resets the data object to the new input data. More...
 
virtual void setRadii (const vector< float > &newRadii)
 Replace the radii currently associated with this Profile with new values. More...
 
virtual void setRadius (int index, float radius)
 Replace the radius at the specified nodeIndex. More...
 
- Public Member Functions inherited from geotess::GeoTessProfile
virtual int findClosestRadiusIndex (double radius) const
 Find the node index of the radius in this Profile that has radius closest to the supplied radius. More...
 
virtual int getPointIndex (int nodeIndex) const
 Get the pointIndex that corresponds to the supplied nodeIndex. More...
 
int getRadiusIndex (double radius) const
 Find index i such that radius is >= radii[i] and < radii[i+1]. More...
 
double getThickness ()
 Return the thickness of the layer in km. More...
 
double getValue (const vector< int > &nodeIds, const vector< double > &coefficients, int attributeIndex) const
 Retrieve the value of the specified attribute interpolated at the specified radius. More...
 
virtual double getValueBottom (int attributeIndex) const
 Retrieve the value of the specified attribute at the bottom of the layer. More...
 

Static Public Member Functions

static string class_name ()
 Returns the class name. More...
 
- Static Public Member Functions inherited from geotess::GeoTessProfile
static int class_count ()
 Returns the class instance count. More...
 
static string class_name ()
 Returns the class name. More...
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< GeoTessData * > &data)
 Static factory method that instantiates a new Profile object of the appropriate type. More...
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< double > > &data)
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< float > > &data)
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< LONG_INT > > &data)
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< int > > &data)
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< short > > &data)
 
static GeoTessProfilenewProfile (const vector< float > &radii, vector< vector< byte > > &data)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, GeoTessData **data, const int &nData)
 Static factory method that instantiates a new Profile object of the appropriate type. More...
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, double **values, const int &nNodes, const int &nAttributes)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, float **values, const int &nNodes, const int &nAttributes)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, LONG_INT **values, const int &nNodes, const int &nAttributes)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, int **values, const int &nNodes, const int &nAttributes)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, short **values, const int &nNodes, const int &nAttributes)
 
static GeoTessProfilenewProfile (float *radii, const int &nRadii, byte **values, const int &nNodes, const int &nAttributes)
 

Detailed Description

A Profile object consisting of N monotonically increasing radii that span the radial extent of a layer, and an equal number of Data objects that define the model values at the corresponding positions.

A Profile object that defines N monotonically increasing radii that span the radial extent of a layer, and an equal number of Data objects that define the model values at the corresponding positions.

Constructor & Destructor Documentation

geotess::GeoTessProfileNPoint::GeoTessProfileNPoint ( float *  r,
GeoTessData **  dat,
int  size 
)
inline

Standard constructor.

Input radii and data values are copied from the input variables into the new Profile object. For the Data** array, a shallow copy is made. In other words, this method instantiates a new Data** and copies the Data* pointers into it. No copies are made of the Data objects.

Parameters
ran array of radius values, in km
datan array of pointers to Data objects.
sizenumber of elements in radii and dat.
geotess::GeoTessProfileNPoint::GeoTessProfileNPoint ( const vector< float > &  r,
vector< GeoTessData * > &  d 
)
inline

Standard constructor.

Input radii and data values are copied from the input variables into the new Profile object. For vector<Data*>, a shallow copy is made. In other words, this method instantiates a new Data** and copies the Data* pointers into it. No copies are made of the Data objects.

Parameters
ran array of radius values, in km
dan array of pointers to Data objects.
geotess::GeoTessProfileNPoint::GeoTessProfileNPoint ( float *  rad,
const vector< GeoTessData * > &  dat 
)

Standard constructor.

Input radii and data values are copied from the input variables into the new Profile object.

Member Function Documentation

static string geotess::GeoTessProfileNPoint::class_name ( )
inlinestatic

Returns the class name.

virtual int geotess::GeoTessProfileNPoint::class_size ( ) const
inlinevirtual

Returns the class size.

Reimplemented from geotess::GeoTessProfile.

virtual GeoTessData** geotess::GeoTessProfileNPoint::getData ( )
inlinevirtual

Retrieve a shallow copy of the array of Data objects associated with this Profile.

Caller assumes ownership of the array, but not the contents, and must delete the array when done with it.

Reimplemented from geotess::GeoTessProfile.

virtual GeoTessData* geotess::GeoTessProfileNPoint::getData ( int  i)
inlinevirtual

Retrieve a reference the i'th Data object.

Reimplemented from geotess::GeoTessProfile.

virtual const GeoTessData& geotess::GeoTessProfileNPoint::getData ( int  i) const
inlinevirtual

Retrieve a reference the i'th Data object.

Reimplemented from geotess::GeoTessProfile.

virtual const GeoTessData& geotess::GeoTessProfileNPoint::getDataBottom ( ) const
inlinevirtual

Get the Data object at the bottom of the profile.

Reimplemented from geotess::GeoTessProfile.

virtual GeoTessData* geotess::GeoTessProfileNPoint::getDataBottom ( )
inlinevirtual

Get the Data object at the bottom of the profile.

Reimplemented from geotess::GeoTessProfile.

virtual const GeoTessData& geotess::GeoTessProfileNPoint::getDataTop ( ) const
inlinevirtual

Get the Data object at the top of the profile.

Reimplemented from geotess::GeoTessProfile.

virtual GeoTessData* geotess::GeoTessProfileNPoint::getDataTop ( )
inlinevirtual

Get the Data object at the top of the profile.

Reimplemented from geotess::GeoTessProfile.

double geotess::GeoTessProfileNPoint::getInterpolationCoefficient ( int  index,
double  radius 
) const
inlinevirtual

Finds interpolation coefficient at the iput radius constrained to lie between radii[index] and radii[index + 1].

Parameters
indexThe index in r such that radius is between r[index] and r[index+1].
radiusThe radius whose interpolation coefficient is desired.
Returns
c[index], the interpolation coefficient to be applied at r[index]. The interpolation coefficient for r[index+1] is 1-c[index].
virtual double geotess::GeoTessProfileNPoint::getInterpolationCoefficient ( int  index,
double  radius,
bool  allowOutOfRange 
) const
virtual

find interpolation coefficient using linear interpolation.

Reimplemented from geotess::GeoTessProfile.

virtual LONG_INT geotess::GeoTessProfileNPoint::getMemory ( )
inlinevirtual

Reimplemented from geotess::GeoTessProfile.

virtual int geotess::GeoTessProfileNPoint::getNData ( ) const
inlinevirtual

Get the number of Data objects that comprise this profile.

Reimplemented from geotess::GeoTessProfile.

virtual int geotess::GeoTessProfileNPoint::getNRadii ( ) const
inlinevirtual

Get the number of radii that comprise this profile.

Reimplemented from geotess::GeoTessProfile.

virtual float* geotess::GeoTessProfileNPoint::getRadii ( )
inlinevirtual

Retrieve a copy of the array of radii values in km.

Caller assumes ownership of the array and must delete it when done with it.

Reimplemented from geotess::GeoTessProfile.

virtual float geotess::GeoTessProfileNPoint::getRadius ( int  i) const
inlinevirtual

Get the i'th radius value in this profile in km.

Radii are in order of increasing radius.

Reimplemented from geotess::GeoTessProfile.

virtual float geotess::GeoTessProfileNPoint::getRadiusBottom ( ) const
inlinevirtual

Get the radius at the bottom of the profile, in km.

Reimplemented from geotess::GeoTessProfile.

virtual int geotess::GeoTessProfileNPoint::getRadiusIndex ( double  radius,
int  jlo 
) const
virtual

Find index i such that x is >= xx[i] and < xx[i+1].

If x < xx[1] returns 0. If x >= xx[xx.length-2] return xx.length-2.

Reimplemented from geotess::GeoTessProfile.

virtual float geotess::GeoTessProfileNPoint::getRadiusTop ( ) const
inlinevirtual

Get the radius at the top of the profile, in km.

Reimplemented from geotess::GeoTessProfile.

virtual const GeoTessProfileType& geotess::GeoTessProfileNPoint::getType ( ) const
inlinevirtual

Returns ProfileType (NPOINT).

Returns
ProfileType (NPOINT).

Reimplemented from geotess::GeoTessProfile.

virtual double geotess::GeoTessProfileNPoint::getValue ( int  attributeIndex,
int  radiusIndex 
) const
inlinevirtual

Retrieve the value of the specified attributes at the specified radius index.

Reimplemented from geotess::GeoTessProfile.

double geotess::GeoTessProfileNPoint::getValue ( const GeoTessInterpolatorType radialType,
int  attributeIndex,
double  radius,
bool  allowRadiusOutOfRange 
) const
inlinevirtual

Retrieve the value of the specified attribute interpolated at the specified radius.

Parameters
radialTypethe interpolator type, either InterpolatorType::LINEAR or InterpolatorType::CUBIC_SPLINE.
attributeIndex
radius
allowRadiusOutOfRangeif false and radius is out of range, returns NaN_DOUBLE
Returns
double
Exceptions
GeoTessException

Reimplemented from geotess::GeoTessProfile.

virtual double geotess::GeoTessProfileNPoint::getValueTop ( int  attributeIndex) const
inlinevirtual

Retrieve the value of the specified attribute at the top of the layer.

Parameters
attributeIndex
Returns
double

Reimplemented from geotess::GeoTessProfile.

bool geotess::GeoTessProfileNPoint::isNaN ( int  nodeIndex,
int  attributeIndex 
)
inlinevirtual

Return true if the specified Data value is NaN.

Parameters
nodeIndex
attributeIndex
Returns
true if the specified Data value is NaN.

Reimplemented from geotess::GeoTessProfile.

virtual bool geotess::GeoTessProfileNPoint::operator== ( const GeoTessProfile p) const
inlinevirtual

Return true if the input Profile object (p) equals this Profile object.

Reimplemented from geotess::GeoTessProfile.

virtual void geotess::GeoTessProfileNPoint::setData ( const vector< GeoTessData * > &  inData)
virtual

Resets the data object to the new input data.

Reimplemented from geotess::GeoTessProfile.

virtual void geotess::GeoTessProfileNPoint::setData ( int  index,
GeoTessData inData 
)
inlinevirtual

Resets the data object to the new input data.

Reimplemented from geotess::GeoTessProfile.

virtual void geotess::GeoTessProfileNPoint::setRadii ( const vector< float > &  newRadii)
inlinevirtual

Replace the radii currently associated with this Profile with new values.

Reimplemented from geotess::GeoTessProfile.

virtual void geotess::GeoTessProfileNPoint::setRadius ( int  index,
float  radius 
)
inlinevirtual

Replace the radius at the specified nodeIndex.

Reimplemented from geotess::GeoTessProfile.


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