GeoTessCPP: geotess::ProfileNPoint Class Reference

GeoTessCPP 2.0.0 Software to facilitate storage and retrieval of 3D information about the Earth.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Static Public Member Functions
geotess::ProfileNPoint Class Reference

`#include <ProfileNPoint.h>`

Inheritance diagram for geotess::ProfileNPoint:

List of all members.

## Public Member Functions
| ProfileNPoint (float *r, Data **dat, int size)
| ProfileNPoint (const vector< float > &r, vector< Data * > &d)
| ProfileNPoint (float *rad, const vector< Data * > &dat)
virtual int | class_size () const
virtual const ProfileType & | getType () const
virtual bool | operator== (const Profile &p) const
bool | isNaN (int nodeIndex, int attributeIndex)
virtual float | getRadius (int i) const
virtual Data ** | getData ()
virtual Data * | getData (int i)
virtual const Data & | getData (int i) const
virtual void | setData (const vector< Data * > &inData)
virtual void | setRadii (const vector< float > &newRadii)
virtual void | setData (int index, Data *inData)
virtual float | getRadiusTop () const
virtual const Data & | getDataTop () const
virtual Data * | getDataTop ()
virtual float | getRadiusBottom () const
virtual const Data & | getDataBottom () const
virtual Data * | getDataBottom ()
virtual int | getNRadii () const
virtual int | getNData () const
virtual float * | getRadii ()
virtual double | getValue (int attributeIndex, int radiusIndex) const
virtual double | getValueTop (int attributeIndex) const
virtual double | getInterpolationCoefficient (int index, double radius) const
virtual double | getValue (const InterpolatorType &radialType, int attributeIndex, double radius, bool allowRadiusOutOfRange) const
virtual int | getRadiusIndex (double radius, int jlo) const
virtual double | getInterpolationCoefficient (int index, double radius, bool allowOutOfRange) const
Public Member Functions inherited from geotess::Profile
double | getValue (const vector< int > &nodeIds, const vector< double > &coefficients, int attributeIndex) const
virtual double | getValueBottom (int attributeIndex) const
double | getThickness ()
int | getRadiusIndex (double radius) const
virtual int | getPointIndex (int nodeIndex) const
virtual int | findClosestRadiusIndex (double radius) const

## Static Public Member Functions
static string | class_name ()
Static Public Member Functions inherited from geotess::Profile
static Profile * | newProfile (const vector< float > &radii, vector< Data * > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< double > > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< float > > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< LONG_INT > > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< int > > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< short > > &data)
static Profile * | newProfile (const vector< float > &radii, vector< vector< byte > > &data)
static Profile * | newProfile (float *radii, const int &nRadii, Data **data, const int &nData)
static Profile * | newProfile (float *radii, const int &nRadii, double **values, const int &nNodes, const int &nAttributes)
static Profile * | newProfile (float *radii, const int &nRadii, float **values, const int &nNodes, const int &nAttributes)
static Profile * | newProfile (float *radii, const int &nRadii, LONG_INT **values, const int &nNodes, const int &nAttributes)
static Profile * | newProfile (float *radii, const int &nRadii, int **values, const int &nNodes, const int &nAttributes)
static Profile * | newProfile (float *radii, const int &nRadii, short **values, const int &nNodes, const int &nAttributes)
static Profile * | newProfile (float *radii, const int &nRadii, byte **values, const int &nNodes, const int &nAttributes)
static int | class_count ()

## Detailed Description

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::ProfileNPoint::ProfileNPoint | ( | float * | r,
|  | Data ** | 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:

  r | an array of radius values, in km
  dat | an array of pointers to Data objects.
  size | number of elements in radii and dat.

geotess::ProfileNPoint::ProfileNPoint | ( | const vector< float > & | r,
|  | vector< Data * > & | 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:

  r | an array of radius values, in km
  d | an array of pointers to Data objects.

geotess::ProfileNPoint::ProfileNPoint | ( | float * | rad,
|  | const vector< Data * > & | 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::ProfileNPoint::class_name | ( |  | ) |
| inlinestatic

Returns the class name.

Reimplemented from geotess::Profile.

virtual int geotess::ProfileNPoint::class_size | ( |  | ) | const
| inlinevirtual

Returns the class size.

Reimplemented from geotess::Profile.

virtual Data** geotess::ProfileNPoint::getData | ( |  | ) |
| inlinevirtual

Retrieve a reference to all of the Data obects associated with this Profile.

Reimplemented from geotess::Profile.

virtual Data* geotess::ProfileNPoint::getData | ( | int | i | ) |
| inlinevirtual

Retrieve a reference the i'th Data object

Reimplemented from geotess::Profile.

virtual const Data& geotess::ProfileNPoint::getData | ( | int | i | ) | const
| inlinevirtual

Retrieve a reference the i'th Data object

Reimplemented from geotess::Profile.

virtual const Data& geotess::ProfileNPoint::getDataBottom | ( |  | ) | const
| inlinevirtual

Get the Data object at the bottom of the profile.

Reimplemented from geotess::Profile.

virtual Data* geotess::ProfileNPoint::getDataBottom | ( |  | ) |
| inlinevirtual

Get the Data object at the bottom of the profile.

Reimplemented from geotess::Profile.

virtual const Data& geotess::ProfileNPoint::getDataTop | ( |  | ) | const
| inlinevirtual

Get the Data object at the top of the profile.

Reimplemented from geotess::Profile.

virtual Data* geotess::ProfileNPoint::getDataTop | ( |  | ) |
| inlinevirtual

Get the Data object at the top of the profile.

Reimplemented from geotess::Profile.

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

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

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

Parameters:

  index | The index in r such that radius is between r[index] and r[index+1].
  radius | The 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::ProfileNPoint::getInterpolationCoefficient | ( | int | index,
|  | double | radius,
|  | bool | allowOutOfRange
| ) |  | const
| virtual

find interpolation coefficient using linear interpolation.

Reimplemented from geotess::Profile.

virtual int geotess::ProfileNPoint::getNData | ( |  | ) | const
| inlinevirtual

Get the number of Data objects that comprise this profile.

Reimplemented from geotess::Profile.

virtual int geotess::ProfileNPoint::getNRadii | ( |  | ) | const
| inlinevirtual

Get the number of radii that comprise this profile.

Reimplemented from geotess::Profile.

virtual float* geotess::ProfileNPoint::getRadii | ( |  | ) |
| inlinevirtual

Retrieve a deeep copy of the radii values in km.

Reimplemented from geotess::Profile.

virtual float geotess::ProfileNPoint::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::Profile.

virtual float geotess::ProfileNPoint::getRadiusBottom | ( |  | ) | const
| inlinevirtual

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

Reimplemented from geotess::Profile.

virtual int geotess::ProfileNPoint::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::Profile.

virtual float geotess::ProfileNPoint::getRadiusTop | ( |  | ) | const
| inlinevirtual

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

Reimplemented from geotess::Profile.

virtual const ProfileType& geotess::ProfileNPoint::getType | ( |  | ) | const
| inlinevirtual

Returns ProfileType (NPOINT).

Returns:
  ProfileType (NPOINT).

Reimplemented from geotess::Profile.

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

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

Reimplemented from geotess::Profile.

double geotess::ProfileNPoint::getValue | ( | const InterpolatorType & | radialType,
|  | int | attributeIndex,
|  | double | radius,
|  | bool | allowRadiusOutOfRange
| ) |  | const
| inlinevirtual

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

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

Parameters:

  radialType | the interpolator type, either InterpolatorType::LINEAR or InterpolatorType::CUBIC_SPLINE.
  attributeIndex |
  radius |
  allowRadiusOutOfRange | if false and radius is out of range, returns NaN_DOUBLE

Returns:
  double

Exceptions:

  GeoTessException |

Reimplemented from geotess::Profile.

virtual double geotess::ProfileNPoint::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::Profile.

bool geotess::ProfileNPoint::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::Profile.

virtual bool geotess::ProfileNPoint::operator== | ( | const Profile & | p | ) | const
| inlinevirtual

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

Reimplemented from geotess::Profile.

virtual void geotess::ProfileNPoint::setData | ( | const vector< Data * > & | inData | ) |
| virtual

Resets the data object to the new input data

Reimplemented from geotess::Profile.

virtual void geotess::ProfileNPoint::setData | ( | int | index,
|  | Data * | inData
| ) |  |
| inlinevirtual

Resets the data object to the new input data

Reimplemented from geotess::Profile.

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

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

Reimplemented from geotess::Profile.

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

- include/ProfileNPoint.h