Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Curve Class Reference
[Data classes]

A one-dimensional bicubic-interpolated look-up table. More...

#include <Interpolate.h>

Inheritance diagram for Curve:

InterpolatedData< float > BaseType List of all members.

Public Types

typedef float value_t
typedef std::vector< value_tvector_t
typedef std::vector< value_t
>::iterator 
vector_it
typedef std::vector< value_t
>::const_iterator 
vector_cit

Public Methods

 Curve ()
 Default constructor.

 Curve (const Curve &)
 Copy constructor.

virtual ~Curve ()
 Destructor.

const Curve & operator= (const Curve &)
 Assignment operator.

virtual void serialize (Archive &)
 Serialize to or from a data archive.

vector_t getBreaks ()
 Get a list of the x values of the source data set.

void setBreaks (const vector_t &breaks)
 Set the x values of the source data set.

void setData (const vector_t &data)
 Set the y values of the source data set.

void interpolate (value_t spacing)
 Interpolate the source data set and resample at at equaly spaced values of x to form the lookup table.

value_t getPrecise (value_t x) const
 Get the "precise" value y(x) from bicubic interpolation.

value_t getValue (value_t x) const
 Get the "quick and dirty" value of y(x) from linear interpolation of the resampled lookup table.

void dumpCurve (FILE *f) const
 Dump the y(x) lookup table to an output file.

virtual std::string asString () const
 String representation.

virtual std::string typeString () const
 Type representation.

virtual value_t getValue (value_t, value_t) const
virtual value_t getPrecise (value_t, value_t) const
int find (vector_t b, value_t v) const
virtual void parseXML (const char *cdata)
 Parse cdata from within the XML tags for this object.

virtual void convertXML ()
 Convert XML data to internal format prior to serialization.


Public Attributes

Enum< InterpolatedData< float
>::Method
method

Static Public Attributes

const Enumeration Method

Protected Methods

virtual void _compute_second_derivatives ()
 Compute the second derivative for bicubic interpolation.

vector_t _compute_second_derivatives (const vector_t &breaks, const vector_t &data)

Detailed Description

A one-dimensional bicubic-interpolated look-up table.

The curve input is a discrete set of (x, y) pairs sampled from a continuous curve y = F(x). A smooth curve is formed from these points using bicubic interpolation, and then resampled at a specified number of evenly spaced values of x. The resampled values can then be used as a fast lookup table (with linear interpolation) to find y(x).

Author:
Mark Rose <mrose@stm.lbl.gov>
Deprecated:
Use Table1 instead.


Member Typedef Documentation

typedef float InterpolatedData< float >::value_t [inherited]
 

typedef std::vector<value_t>::const_iterator InterpolatedData< float >::vector_cit [inherited]
 

typedef std::vector<value_t>::iterator InterpolatedData< float >::vector_it [inherited]
 

typedef std::vector<value_t> InterpolatedData< float >::vector_t [inherited]
 


Constructor & Destructor Documentation

Curve::Curve  
 

Default constructor.

Curve::Curve const Curve &   
 

Copy constructor.

Curve::~Curve   [virtual]
 

Destructor.


Member Function Documentation

vector_t InterpolatedData< float >::_compute_second_derivatives const vector_t   breaks,
const vector_t   data
[protected, inherited]
 

void Curve::_compute_second_derivatives   [protected, virtual]
 

Compute the second derivative for bicubic interpolation.

Implements InterpolatedData< float >.

std::string Curve::asString   [virtual]
 

String representation.

Implements BaseType.

void BaseType::convertXML   [virtual, inherited]
 

Convert XML data to internal format prior to serialization.

This method is currently only called by the XML parser for Object classes. If another BaseType class requires this method, a call must be added to the appropriate XML handler in the parser.

void Curve::dumpCurve FILE *    f const
 

Dump the y(x) lookup table to an output file.

int InterpolatedData< float >::find vector_t    b,
value_t    v
const [inherited]
 

Curve::vector_t Curve::getBreaks  
 

Get a list of the x values of the source data set.

virtual value_t InterpolatedData< float >::getPrecise value_t   ,
value_t   
const [virtual, inherited]
 

Curve::value_t Curve::getPrecise value_t    x const
 

Get the "precise" value y(x) from bicubic interpolation.

virtual value_t InterpolatedData< float >::getValue value_t   ,
value_t   
const [virtual, inherited]
 

Curve::value_t Curve::getValue value_t    x const
 

Get the "quick and dirty" value of y(x) from linear interpolation of the resampled lookup table.

void Curve::interpolate value_t    spacing
 

Interpolate the source data set and resample at at equaly spaced values of x to form the lookup table.

Parameters:
spacing  the spacing between resampled values of X

const Curve & Curve::operator= const Curve &   
 

Assignment operator.

void BaseType::parseXML const char *    cdata [virtual, inherited]
 

Parse cdata from within the XML tags for this object.

Reimplemented in SimDate, EnumLink, GeoPos, LLA, UTM, Matrix3, Quat, Real, and Vector3.

void Curve::serialize Archive   [virtual]
 

Serialize to or from a data archive.

Reimplemented from InterpolatedData< float >.

void Curve::setBreaks const vector_t   breaks
 

Set the x values of the source data set.

void Curve::setData const vector_t   data
 

Set the y values of the source data set.

std::string Curve::typeString   [virtual]
 

Type representation.

Implements BaseType.


Member Data Documentation

Enum<InterpolatedData<float>::Method> InterpolatedData< float >::method [inherited]
 

const Enumeration InterpolatedData< float >::Method [static, inherited]
 


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:40 2003, using Doxygen 1.2.18.

[SF.net]