OpendTect-6_4  6.4
Classes | Macros | Typedefs | Functions
ranges.h File Reference
Include dependency graph for ranges.h:

Go to the source code of this file.

Classes

class  BasicInterval< T >
 Base class for Interval. Has no virtual functions and can hence be used in places where no virtual functions are allowed (e.g. large memcpy operations. Does not have sort, clone and scale functions. If you need then, use the Interval<T> instead. More...
 
class  Interval< T >
 Interval of values. More...
 
class  StepInterval< T >
 Interval with step. More...
 
class  IntervalND< T >
 Class to store ranges in N dimensions. More...
 

Macros

#define mCenterImpl(func, typ)
 
#define mDefFNrSteps(typ)
 
#define mDefFltisCompat(typ, releps)
 

Typedefs

typedef Interval< int > SampleGate
 
typedef Interval< float > ZGate
 

Functions

template<class T1 , class T2 >
void assign (Interval< T1 > &i1, const Interval< T2 > &i2)
 
template<class T1 , class T2 >
void assign (StepInterval< T1 > &i1, const StepInterval< T2 > &i2)
 

Macro Definition Documentation

#define mCenterImpl (   func,
  typ 
)
Value:
template <class T> inline \
{ return ((typ)(start+stop))/2; }
Base class for Interval. Has no virtual functions and can hence be used in places where no virtual fu...
Definition: ranges.h:31
#define mDefFltisCompat (   typ,
  releps 
)
Value:
template <> \
float eps ) const \
{ \
const typ castedeps = (typ) eps; \
if ( !mIsEqual(step,b.step, castedeps) ) return false; \
\
typ nrsteps = (start - b.start) / step; \
const int nrstepsi = mNINT32( nrsteps ); \
if ( !nrstepsi ) \
return mIsEqual( start, b.start, \
mIsZero(start,releps) ? releps \
: start < 0. ? -start * releps \
: start * releps );\
\
typ reldiff = (nrsteps - nrstepsi) / nrsteps; \
return ( (reldiff) < (releps) && (reldiff) > (-releps) ); \
}
#define mIsZero(x, eps)
Definition: commondefs.h:53
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
#define mIsEqual(x, y, eps)
Definition: commondefs.h:54
#define mNINT32(x)
Definition: commondefs.h:45
Interval with step.
Definition: commontypes.h:33
bool isCompatible(const StepInterval< T > &, float eps=(1e-10)) const
Definition: ranges.h:794
#define mDefFNrSteps (   typ)
Value:
template <> \
inline int StepInterval<typ>::nrSteps() const \
{ \
if ( !step ) return 0; \
typ ns = ( (start > stop ? start : stop) \
- (start > stop ? stop : start) ) \
/ (step > 0 ? step : -step); \
return mNINT32(ns); \
}
int nrSteps() const
Definition: ranges.h:771
#define mNINT32(x)
Definition: commondefs.h:45

Typedef Documentation

typedef Interval<int> SampleGate
typedef Interval<float> ZGate

Function Documentation

template<class T1 , class T2 >
void assign ( Interval< T1 > &  i1,
const Interval< T2 > &  i2 
)
inline
template<class T1 , class T2 >
void assign ( StepInterval< T1 > &  i1,
const StepInterval< T2 > &  i2 
)
inline

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