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

LUT< 1, X > Class Template Reference

One-dimensional lookup table specialization. More...

#include <LUT.h>

Inheritance diagram for LUT< 1, X >:

InterpolationType< X > Interpolation BaseType List of all members.

Public Types

typedef VEC< 1, int > Dim
typedef VEC< 1, X > Vec
typedef VEC< 1, std::vector<
X > > 
Breaks
enum  Modes { LINEAR, SPLINE }

Public Methods

__get (int n) const
 LUT ()
virtual ~LUT ()
 LUT (LUT< 1, X > const &copy)
LUT< 1, X > const & operator= (LUT< 1, X > const &copy)
void interpolate (Dim const &dim, Interpolation::Modes mode)
void interpolate (std::vector< int > const &dim, Interpolation::Modes mode)
getValue (Vec const &v) const
getValue (std::vector< X > const &x) const
operator[] (Vec const &v) const
void load (std::vector< X > const &values, Breaks const &breaks, int *index=0)
void load (std::vector< X > const &values, std::vector< std::vector< X > > const &breaks)
virtual void serialize (Archive &)
 Serialize to or from a data archive.

virtual std::string asString () const
 Return a string representation of LUT.

virtual std::string typeString () const
 Return a string representation of the type.

bool isInterpolated () const
 Return true if the interpolated table is ready for use.

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.


Protected Methods

void find (X x, int &i, X &f) const
 Find the index and interpolation parameter for a given coordinate.

void postInterpolation (X x0, X x1, int n)
 Compute a few parameters needed for fast lookups.

void checkInterpolated () const
void checkNotInterpolated () const
void throwBreakpointOrder () const
void throwInterpolationMode () const

Protected Attributes

m_X0
m_X1
m_XS
int m_Limit
bool m_Interpolated

Friends

class LUT< 2, X >

Detailed Description

template<typename X>
class LUT< 1, X >

One-dimensional lookup table specialization.

Author:
Mark Rose <mrose@stm.lbl.gov>


Member Typedef Documentation

template<typename X>
typedef VEC<1, std::vector<X> > LUT< 1, X >::Breaks
 

template<typename X>
typedef VEC<1, int> LUT< 1, X >::Dim
 

template<typename X>
typedef VEC<1, X> LUT< 1, X >::Vec
 


Member Enumeration Documentation

enum Interpolation::Modes [inherited]
 

Enumeration values:
LINEAR 
SPLINE 


Constructor & Destructor Documentation

template<typename X>
LUT< 1, X >::~LUT   [virtual]
 


Member Function Documentation

template<typename X>
X LUT< 1, X >::__get int    n const [inline]
 

template<typename X>
std::string LUT< 1, X >::asString   const [virtual]
 

Return a string representation of LUT.

Implements BaseType.

void Interpolation::checkInterpolated   const [inline, protected, inherited]
 

void Interpolation::checkNotInterpolated   const [inline, protected, inherited]
 

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.

template<typename X>
void InterpolationType< X >::find   x,
int &    i,
X &    f
const [inline, protected, inherited]
 

Find the index and interpolation parameter for a given coordinate.

template<typename X>
X LUT< 1, X >::getValue std::vector< X > const &    x const [inline]
 

template<typename X>
X LUT< 1, X >::getValue Vec const &    v const
 

template<typename X>
void LUT< 1, X >::interpolate std::vector< int > const &    dim,
Interpolation::Modes    mode
 

template<typename X>
void LUT< 1, X >::interpolate Dim const &    dim,
Interpolation::Modes    mode
 

bool Interpolation::isInterpolated   const [inline, inherited]
 

Return true if the interpolated table is ready for use.

template<typename X>
void LUT< 1, X >::load std::vector< X > const &    values,
std::vector< std::vector< X > > const &    breaks
 

template<typename X>
void LUT< 1, X >::load std::vector< X > const &    values,
Breaks const &    breaks,
int *    index = 0
 

template<typename X>
LUT< 1, X >::LUT LUT< 1, X > const &    copy
 

template<typename X>
LUT< 1, X >::LUT  
 

template<typename X>
LUT< 1, X > const & LUT< 1, X >::operator= LUT< 1, X > const &    copy
 

template<typename X>
X LUT< 1, X >::operator[] Vec const &    v const [inline]
 

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.

template<typename X>
void InterpolationType< X >::postInterpolation   x0,
  x1,
int    n
[protected, inherited]
 

Compute a few parameters needed for fast lookups.

Called after a LUT has been interpolated.

template<typename X>
void LUT< 1, X >::serialize Archive   archive [virtual]
 

Serialize to or from a data archive.

Reimplemented from BaseType.

void Interpolation::throwBreakpointOrder   const [inline, protected, inherited]
 

void Interpolation::throwInterpolationMode   const [inline, protected, inherited]
 

template<typename X>
std::string LUT< 1, X >::typeString   [virtual]
 

Return a string representation of the type.

Implements BaseType.


Friends And Related Function Documentation

template<typename X>
friend class LUT< 2, X > [friend]
 


Member Data Documentation

bool Interpolation::m_Interpolated [protected, inherited]
 

template<typename X>
int InterpolationType< X >::m_Limit [protected, inherited]
 

template<typename X>
X InterpolationType< X >::m_X0 [protected, inherited]
 

template<typename X>
X InterpolationType< X >::m_X1 [protected, inherited]
 

template<typename X>
X InterpolationType< X >::m_XS [protected, 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:41 2003, using Doxygen 1.2.18.

[SF.net]