OpendTect  6.6
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
 
typedef StepInterval< float > ZSampling
 

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

◆ mCenterImpl

#define mCenterImpl (   func,
  typ 
)
Value:
template <class T> inline \
{ return ((typ)(start+stop))/2; }

◆ mDefFltisCompat

#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) ); \
}

◆ mDefFNrSteps

#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); \
}

Typedef Documentation

◆ SampleGate

typedef Interval<int> SampleGate

◆ ZGate

typedef Interval<float> ZGate

◆ ZSampling

typedef StepInterval<float> ZSampling

Function Documentation

◆ assign() [1/2]

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

◆ assign() [2/2]

template<class T1 , class T2 >
void assign ( StepInterval< T1 > &  i1,
const StepInterval< T2 > &  i2 
)
inline
mIsEqual
#define mIsEqual(x, y, eps)
Definition: commondefs.h:67
StepInterval::nrSteps
int nrSteps() const
Definition: ranges.h:791
StepInterval::isCompatible
bool isCompatible(const StepInterval< T > &, float eps=(1e-10)) const
Definition: ranges.h:814
StepInterval
Interval with step.
Definition: commontypes.h:32
mIsZero
#define mIsZero(x, eps)
Definition: commondefs.h:66
BasicInterval
Base class for Interval. Has no virtual functions and can hence be used in places where no virtual fu...
Definition: ranges.h:31
mNINT32
#define mNINT32(x)
Definition: commondefs.h:58

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