OpendTect-6_4  6.4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BendPointBasedMathFunction< xT, yT > Class Template Reference

MathFunction based on bend points. More...

Inheritance diagram for BendPointBasedMathFunction< xT, yT >:
[legend]

Public Types

enum  InterpolType { Linear, Poly, Snap }
 
enum  ExtrapolType { None, EndVal, ExtraPolGradient }
 

Public Member Functions

 BendPointBasedMathFunction (InterpolType t=Linear, ExtrapolType extr=EndVal)
 
void setEmpty ()
 
int size () const
 
bool isEmpty () const
 
void add (xT x, yT y)
 
void remove (int idx)
 
yT getValue (xT x) const
 
const TypeSet< xT > & xVals () const
 
const TypeSet< yT > & yVals () const
 
InterpolType interpolType () const
 
ExtrapolType extrapolateType () const
 
bool extrapolate () const
 
void setInterpolType (InterpolType t)
 
void setExtrapolateType (ExtrapolType t)
 
virtual yT getNDValue (const xT *p) const
 
void setXValue (int idx, xT x)
 
- Public Member Functions inherited from MathFunction< yT, xT >
virtual int getNrDim () const
 
- Public Member Functions inherited from MathFunctionND< yT, xT >
virtual ~MathFunctionND ()
 

Protected Member Functions

int baseIdx (xT) const
 
yT snapVal (xT) const
 
yT interpVal (xT) const
 
yT outsideVal (xT) const
 

Protected Attributes

InterpolType itype_
 
ExtrapolType extrapol_
 
TypeSet< xT > x_
 
TypeSet< yT > y_
 

Detailed Description

template<class xT, class yT>
class BendPointBasedMathFunction< xT, yT >

MathFunction based on bend points.

The object maintains sorted positions (in X), so you cannot bluntly stuff X and Y in. You cannot change or remove positions; instead make a copy.

If the given point is outside the 'defined' X-range, the value can be undef or the first/last defined point's value, depending on the 'extrapol_' setting. If no point at all is defined you will always get undef.

You can add undefined Y-values, but not undef X-values (those add()'s simply return). Undef sections are therefore supported.

Member Enumeration Documentation

template<class xT, class yT>
enum BendPointBasedMathFunction::ExtrapolType
Enumerator
None 
EndVal 
ExtraPolGradient 
template<class xT, class yT>
enum BendPointBasedMathFunction::InterpolType
Enumerator
Linear 
Poly 
Snap 

Constructor & Destructor Documentation

template<class xT, class yT>
BendPointBasedMathFunction< xT, yT >::BendPointBasedMathFunction ( InterpolType  t = Linear,
ExtrapolType  extr = EndVal 
)
inline

Member Function Documentation

template<class xT, class yT>
void BendPointBasedMathFunction< mXT, mYT >::add ( xT  x,
yT  y 
)
inline
template<class xT, class yT>
int BendPointBasedMathFunction< mXT, mYT >::baseIdx ( xT  ) const
inlineprotected
template<class xT, class yT>
bool BendPointBasedMathFunction< xT, yT >::extrapolate ( ) const
inline
template<class xT, class yT>
ExtrapolType BendPointBasedMathFunction< xT, yT >::extrapolateType ( ) const
inline
template<class xT, class yT>
virtual yT BendPointBasedMathFunction< xT, yT >::getNDValue ( const xT *  p) const
inlinevirtual

Reimplemented from MathFunction< yT, xT >.

template<class xT, class yT>
yT BendPointBasedMathFunction< xT, yT >::getValue ( xT  x) const
inlinevirtual
template<class xT, class yT>
InterpolType BendPointBasedMathFunction< xT, yT >::interpolType ( ) const
inline
template<class xT, class yT>
mYT BendPointBasedMathFunction< mXT, mYT >::interpVal ( xT  ) const
inlineprotected
template<class xT, class yT>
bool BendPointBasedMathFunction< xT, yT >::isEmpty ( ) const
inline
template<class xT, class yT>
mYT BendPointBasedMathFunction< mXT, mYT >::outsideVal ( xT  ) const
inlineprotected
template<class mXT , class mYT >
void BendPointBasedMathFunction< mXT, mYT >::remove ( int  idx)
inline
template<class xT, class yT>
void BendPointBasedMathFunction< xT, yT >::setEmpty ( )
inline
template<class xT, class yT>
void BendPointBasedMathFunction< xT, yT >::setExtrapolateType ( ExtrapolType  t)
inline
template<class xT, class yT>
void BendPointBasedMathFunction< xT, yT >::setInterpolType ( InterpolType  t)
inline
template<class xT, class yT>
void BendPointBasedMathFunction< mXT, mYT >::setXValue ( int  idx,
xT  x 
)
inline
template<class xT, class yT>
int BendPointBasedMathFunction< xT, yT >::size ( ) const
inline
template<class xT, class yT>
mYT BendPointBasedMathFunction< mXT, mYT >::snapVal ( xT  ) const
inlineprotected
template<class xT, class yT>
const TypeSet<xT>& BendPointBasedMathFunction< xT, yT >::xVals ( ) const
inline
template<class xT, class yT>
const TypeSet<yT>& BendPointBasedMathFunction< xT, yT >::yVals ( ) const
inline

Member Data Documentation

template<class xT, class yT>
ExtrapolType BendPointBasedMathFunction< xT, yT >::extrapol_
protected
template<class xT, class yT>
InterpolType BendPointBasedMathFunction< xT, yT >::itype_
protected
template<class xT, class yT>
TypeSet<xT> BendPointBasedMathFunction< xT, yT >::x_
protected
template<class xT, class yT>
TypeSet<yT> BendPointBasedMathFunction< xT, yT >::y_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019