OpendTect  7.0
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  ExtrapolType { None , EndVal , ExtraPolGradient }
 
enum  InterpolType { Linear , Poly , Snap }
 

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

ExtrapolType extrapol_
 
InterpolType itype_
 
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

◆ ExtrapolType

template<class xT , class yT >
enum BendPointBasedMathFunction::ExtrapolType
Enumerator
None 
EndVal 
ExtraPolGradient 

◆ InterpolType

template<class xT , class yT >
enum BendPointBasedMathFunction::InterpolType
Enumerator
Linear 
Poly 
Snap 

Constructor & Destructor Documentation

◆ BendPointBasedMathFunction()

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

Member Function Documentation

◆ add() [1/2]

template<class xT , class yT >
void BendPointBasedMathFunction< xT, yT >::add ( xT  x,
yT  y 
)

◆ add() [2/2]

template<class xT , class yT >
void BendPointBasedMathFunction< xT, yT >::add ( xT  x,
yT  y,
bool  checkforduplicates 
)

◆ baseIdx()

template<class xT , class yT >
int BendPointBasedMathFunction< mXT, mYT >::baseIdx ( xT  ) const
inlineprotected

◆ extrapolate()

template<class xT , class yT >
bool BendPointBasedMathFunction< xT, yT >::extrapolate ( ) const
inline

◆ extrapolateType()

template<class xT , class yT >
ExtrapolType BendPointBasedMathFunction< xT, yT >::extrapolateType ( ) const
inline

◆ getNDValue()

template<class xT , class yT >
yT BendPointBasedMathFunction< xT, yT >::getNDValue ( const xT *  p) const
inlineoverride

◆ getValue()

template<class xT , class yT >
yT BendPointBasedMathFunction< xT, yT >::getValue ( xT  x) const
inlineoverridevirtual

◆ interpolType()

template<class xT , class yT >
InterpolType BendPointBasedMathFunction< xT, yT >::interpolType ( ) const
inline

◆ interpVal()

template<class xT , class yT >
mYT BendPointBasedMathFunction< mXT, mYT >::interpVal ( xT  ) const
inlineprotected

◆ isEmpty()

template<class xT , class yT >
bool BendPointBasedMathFunction< xT, yT >::isEmpty ( ) const
inline

◆ outsideVal()

template<class xT , class yT >
mYT BendPointBasedMathFunction< mXT, mYT >::outsideVal ( xT  ) const
inlineprotected

◆ remove()

template<class mXT , class mYT >
void BendPointBasedMathFunction< mXT, mYT >::remove ( int  idx)
inline

◆ setEmpty()

template<class xT , class yT >
void BendPointBasedMathFunction< xT, yT >::setEmpty ( )
inline

◆ setExtrapolateType()

template<class xT , class yT >
void BendPointBasedMathFunction< xT, yT >::setExtrapolateType ( ExtrapolType  t)
inline

◆ setInterpolType()

template<class xT , class yT >
void BendPointBasedMathFunction< xT, yT >::setInterpolType ( InterpolType  t)
inline

◆ setXValue()

template<class xT , class yT >
void BendPointBasedMathFunction< mXT, mYT >::setXValue ( int  idx,
xT  x 
)
inline

◆ size()

template<class xT , class yT >
int BendPointBasedMathFunction< xT, yT >::size ( ) const
inline

◆ snapVal()

template<class xT , class yT >
mYT BendPointBasedMathFunction< mXT, mYT >::snapVal ( xT  ) const
inlineprotected

◆ xVals()

template<class xT , class yT >
const TypeSet<xT>& BendPointBasedMathFunction< xT, yT >::xVals ( ) const
inline

◆ yVals()

template<class xT , class yT >
const TypeSet<yT>& BendPointBasedMathFunction< xT, yT >::yVals ( ) const
inline

Member Data Documentation

◆ extrapol_

template<class xT , class yT >
ExtrapolType BendPointBasedMathFunction< xT, yT >::extrapol_
protected

◆ itype_

template<class xT , class yT >
InterpolType BendPointBasedMathFunction< xT, yT >::itype_
protected

◆ x_

template<class xT , class yT >
TypeSet<xT> BendPointBasedMathFunction< xT, yT >::x_
protected

◆ y_

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. 1995-2024