OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DataDistributionExtracter< vT > Class Template Reference

Extracts a data distribution from input data: TypeSet or simply ptr + size ArrayND (will try to work with the getData() pointer) ValueSeries (will try to work with the arr() pointer) More...

Inheritance diagram for DataDistributionExtracter< vT >:
[legend]

Public Types

typedef ArrayND< vT > ArrNDType
 
typedef RefMan< DistribTypeDistribRef
 
typedef DataDistribution< vT > DistribType
 
typedef Interval< vT > RangeType
 
- Public Types inherited from Task
enum  Control { Run , Pause , Stop }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 DataDistributionExtracter (const ArrNDType &arr)
 
 DataDistributionExtracter (const TypeSet< vT > &ts)
 
 DataDistributionExtracter (const ValueSeries< vT > &vs, od_int64 sz)
 
 DataDistributionExtracter (const vT *arr, od_int64 sz)
 
virtual ~DataDistributionExtracter ()
 
RangeType getDataRange () const
 
int getDefNrBins () const
 
DistribRef getDistribution ()
 
od_int64 nrIterations () const override
 
void reset ()
 
void setBounds (RangeType intv)
 
void setNrBins (int nr)
 
- Public Member Functions inherited from ParallelTask
virtual ~ParallelTask ()
 
void doParallel (bool yn)
 
bool execute () override
 
virtual bool executeParallel (bool parallel)
 
std::int64_t nrDone () const override
 May be -1, i.e. class does not report nrdone. More...
 
std::int64_t totalNr () const override
 
- Public Member Functions inherited from ReportingTask
virtual ~ReportingTask ()
 
void getProgress (const ReportingTask &)
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void controlWork (Control)
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
virtual uiRetVal errorWithDetails () const
 
virtual Control getState () const
 
virtual uiString uiMessage () const
 will be message() again in 7.x More...
 
virtual uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
bool workControlEnabled () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static SamplingData< vT > getSamplingFor (RangeType, int nrbins)
 
- Static Public Member Functions inherited from ParallelTask
static uiString sPosFinished ()
 
static uiString sTrcFinished ()
 
- Static Public Member Functions inherited from Task
static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

void determineBounds ()
 
bool doPrepare (int) override
 
bool doWork (od_int64, od_int64, int) override
 
void init ()
 
void putInBin (vT, TypeSet< vT > &, const SamplingData< vT > &, const int)
 
- Protected Member Functions inherited from ParallelTask
 ParallelTask (const char *nm=0)
 
 ParallelTask (const ParallelTask &)
 
void addToNrDone (std::int64_t increment)
 
std::int64_t calculateThreadSize (std::int64_t totalnr, int nrthreads, int thread) const
 
virtual int maxNrThreads () const
 
virtual int minThreadSize () const
 
void quickAddToNrDone (std::int64_t loopidx)
 
void resetNrDone ()
 
virtual bool stopAllOnFailure () const
 
- Protected Member Functions inherited from ReportingTask
 ReportingTask (const char *nm=nullptr)
 
void incrementProgress ()
 
ProgressMeterprogressMeter () const
 
void reportProgressFinished ()
 
void reportProgressStarted ()
 
void resetProgress ()
 
void setProgressMeter (ProgressMeter *) override
 Must be called before execute() More...
 
void updateProgressMeter (bool forced=false, std::int64_t *totalnr=0)
 
void updateReportedName ()
 
- Protected Member Functions inherited from Task
 Task (const char *nm=nullptr)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Static Protected Member Functions

static void includeInRange (RangeType &, vT)
 

Protected Attributes

const vT * arr_
 
const ArrayND< vT > * arrnd_
 
RangeType bounds_
 
DistribRef distrib_
 
int nrbins_
 
const od_int64 totalsz_
 
const ValueSeries< vT > * vs_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Additional Inherited Members

- Public Attributes inherited from ReportingTask
Notifier< ReportingTaskprogressUpdated
 

Detailed Description

template<class vT>
class DataDistributionExtracter< vT >

Extracts a data distribution from input data: TypeSet or simply ptr + size ArrayND (will try to work with the getData() pointer) ValueSeries (will try to work with the arr() pointer)

<>

Member Typedef Documentation

◆ ArrNDType

template<class vT >
typedef ArrayND<vT> DataDistributionExtracter< vT >::ArrNDType

◆ DistribRef

template<class vT >
typedef RefMan<DistribType> DataDistributionExtracter< vT >::DistribRef

◆ DistribType

template<class vT >
typedef DataDistribution<vT> DataDistributionExtracter< vT >::DistribType

◆ RangeType

template<class vT >
typedef Interval<vT> DataDistributionExtracter< vT >::RangeType

Constructor & Destructor Documentation

◆ DataDistributionExtracter() [1/4]

template<class vT >
DataDistributionExtracter< vT >::DataDistributionExtracter ( const ArrNDType arr)
inline

◆ DataDistributionExtracter() [2/4]

template<class vT >
DataDistributionExtracter< vT >::DataDistributionExtracter ( const vT *  arr,
od_int64  sz 
)
inline

◆ DataDistributionExtracter() [3/4]

template<class vT >
DataDistributionExtracter< vT >::DataDistributionExtracter ( const ValueSeries< vT > &  vs,
od_int64  sz 
)
inline

◆ DataDistributionExtracter() [4/4]

template<class vT >
DataDistributionExtracter< vT >::DataDistributionExtracter ( const TypeSet< vT > &  ts)
inline

◆ ~DataDistributionExtracter()

template<class vT >
virtual DataDistributionExtracter< vT >::~DataDistributionExtracter ( )
inlinevirtual

Member Function Documentation

◆ determineBounds()

template<class vT >
void DataDistributionExtracter< vT >::determineBounds
inlineprotected

◆ doPrepare()

template<class vT >
bool DataDistributionExtracter< vT >::doPrepare ( int  nrthreads)
inlineoverrideprotectedvirtual

Called once, before any doWork is called.

Reimplemented from ParallelTask.

◆ doWork()

template<class vT >
bool DataDistributionExtracter< vT >::doWork ( od_int64  start,
od_int64  stop,
int   
)
inlineoverrideprotected

◆ getDataRange()

template<class vT >
Interval< vT > DataDistributionExtracter< vT >::getDataRange
inline

◆ getDefNrBins()

template<class vT >
int DataDistributionExtracter< vT >::getDefNrBins
inline

◆ getDistribution()

template<class vT >
DataDistributionExtracter< vT >::DistribRef DataDistributionExtracter< vT >::getDistribution
inline

◆ getSamplingFor()

template<class vT >
SamplingData< vT > DataDistributionExtracter< vT >::getSamplingFor ( RangeType  rg,
int  nrbins 
)
inlinestatic

◆ includeInRange()

template<class vT >
void DataDistributionExtracter< vT >::includeInRange ( RangeType rg,
vT  val 
)
inlinestaticprotected

◆ init()

template<class vT >
void DataDistributionExtracter< vT >::init
inlineprotected

◆ nrIterations()

template<class vT >
od_int64 DataDistributionExtracter< vT >::nrIterations ( ) const
inlineoverridevirtual
Returns
the number of times the process should be run.

Implements ParallelTask.

◆ putInBin()

template<class vT >
void DataDistributionExtracter< vT >::putInBin ( vT  val,
TypeSet< vT > &  subdistrib,
const SamplingData< vT > &  sd,
const int  nrbins 
)
inlineprotected

◆ reset()

template<class vT >
void DataDistributionExtracter< vT >::reset ( )
inline

◆ setBounds()

template<class vT >
void DataDistributionExtracter< vT >::setBounds ( RangeType  intv)
inline

◆ setNrBins()

template<class vT >
void DataDistributionExtracter< vT >::setNrBins ( int  nr)
inline

Member Data Documentation

◆ arr_

template<class vT >
const vT* DataDistributionExtracter< vT >::arr_
protected

◆ arrnd_

template<class vT >
const ArrayND<vT>* DataDistributionExtracter< vT >::arrnd_
protected

◆ bounds_

template<class vT >
RangeType DataDistributionExtracter< vT >::bounds_
protected

◆ distrib_

template<class vT >
DistribRef DataDistributionExtracter< vT >::distrib_
protected

◆ nrbins_

template<class vT >
int DataDistributionExtracter< vT >::nrbins_
protected

◆ totalsz_

template<class vT >
const od_int64 DataDistributionExtracter< vT >::totalsz_
protected

◆ vs_

template<class vT >
const ValueSeries<vT>* DataDistributionExtracter< vT >::vs_
protected

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