OpendTect  6.3
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Pos::IdxPairValueSet Class Reference

uses an IdxPairDataSet to hold arrays of floats More...

Inheritance diagram for Pos::IdxPairValueSet:
[legend]

Public Types

typedef IdxPair::IdxType IdxType
 
typedef ValueIdxPair< IdxPair, float > PairVal
 
typedef IdxPairValues< IdxPair, float > DataRow
 
typedef IdxPairDataSet::SPos SPos
 
typedef IdxPairDataSet::ArrIdxType ArrIdxType
 
typedef IdxPairDataSet::GlobIdxType GlobIdxType
 

Public Member Functions

 IdxPairValueSet (int nr_vals, bool allow_dupl_idxpairs)
 
virtual ~IdxPairValueSet ()
 
IdxPairValueSetoperator= (const IdxPairValueSet &)
 
void allowDuplicateIdxPairs (bool yn)
 
bool allowsDuplicateIdxPairs () const
 
void setEmpty ()
 
bool append (const IdxPairValueSet &oth)
 
void remove (const IdxPairValueSet &oth)
 
void copyStructureFrom (const IdxPairValueSet &)
 will also empty this set More...
 
SPos find (const IdxPair &ip) const
 
SPos findOccurrence (const IdxPair &ip, int occ=0) const
 
bool next (SPos &spos, bool skip_dupl_idxpairs=false) const
 
bool prev (SPos &spos, bool skip_dupl_idxpairs=false) const
 
bool isValid (const IdxPair &spos) const
 
void get (const SPos &, float *v=0, int mxnrvals=-1) const
 
void get (const SPos &, IdxPair &, float *v=0, int mxnrv=-1) const
 
IdxPair getIdxPair (const SPos &spos) const
 
SPos getPos (GlobIdxType global_idx) const
 
SPos add (const IdxPair &, const float *vs=0)
 Either pass sufficient data or pass null. More...
 
SPos add (const DataRow &)
 Wrong-sized will be handled correctly. More...
 
void set (SPos, const float *vs=0)
 
int nrVals () const
 
IdxType nrFirst () const
 
IdxType nrSecond (IdxType firstidx) const
 
bool isEmpty () const
 
bool includes (const IdxPair &ip) const
 
bool hasFirst (IdxType inl) const
 
bool hasSecond (IdxType crl) const
 
IdxPair firstIdxPair () const
 
GlobIdxType totalSize () const
 
Interval< IdxTypefirstRange () const
 
Interval< IdxTypesecondRange (IdxType frstidx=-1) const
 
Interval< float > valRange (int valnr) const
 
bool insertVal (int)
 
bool setNrVals (int)
 
bool hasDuplicateIdxPairs () const
 
ArrIdxType nrDuplicateIdxPairs () const
 
void removeDuplicateIdxPairs ()
 
void randomSubselect (od_int64 maxsz)
 
void extend (const IdxPairDelta &stepout, const IdxPairStep &, bool avoiddups=true)
 
void add (const PosInfo::CubeData &)
 
void remove (const SPos &spos)
 
void remove (const TypeSet< SPos > &torem)
 
void removeRange (int valnr, const Interval< float > &, bool inside=true)
 
void remove (const TrcKeySampling &hrg, bool inside)
 
void removeVal (int)
 Will remove entire 'column'. More...
 
SPos add (const PairVal &)
 
SPos add (const IdxPair &, float)
 
SPos add (const IdxPair &, double)
 
SPos add (const IdxPair &, float, float)
 
SPos add (const IdxPair &, const TypeSet< float > &)
 
void get (const SPos &, DataRow &) const
 
void get (const SPos &, PairVal &) const
 
void get (const SPos &, IdxPair &, float &) const
 
void get (const SPos &, IdxPair &, float &, float &) const
 
void get (const SPos &, IdxPair &, TypeSet< float > &, int mxnrvals=-1) const
 
void get (const SPos &, TypeSet< float > &, int maxnrvals=-1) const
 
void set (const SPos &, float)
 
void set (const SPos &, float, float)
 
void set (const SPos &, const TypeSet< float > &)
 
void getColumn (int valnr, TypeSet< float > &, bool incudf) const
 
void fillPar (IOPar &, const char *key) const
 
void usePar (const IOPar &, const char *key)
 
bool getFrom (od_istream &, Pos::GeomID=mUdf(Pos::GeomID))
 detects/converts coords if geomid passed More...
 
bool putTo (od_ostream &) const
 
ArrIdxType nrPos (ArrIdxType lineidx) const
 
float * getVals (const SPos &)
 Direct access to value arrays. More...
 
const float * getVals (const SPos &) const
 Direct access to value arrays. More...
 
float getVal (const SPos &pos, int valnr) const
 Direct access to value arrays. More...
 
bool haveDataRow (const DataRow &) const
 
ArrIdxType nrInls () const
 
ArrIdxType nrCrls (IdxType inl) const
 
ArrIdxType nrRows () const
 
ArrIdxType nrCols (IdxType row) const
 
bool hasInl (IdxType inl) const
 
bool hasCrl (IdxType crl) const
 
bool hasRow (IdxType row) const
 
bool hasCol (IdxType col) const
 
Interval< IdxTypeinlRange () const
 
Interval< IdxTyperowRange () const
 
Interval< IdxTypecrlRange (IdxType inl=-1) const
 
Interval< IdxTypecolRange (IdxType row=-1) const
 

Protected Member Functions

float * gtVals (const SPos &spos)
 
const float * gtVals (const SPos &spos) const
 

Protected Attributes

const int nrvals_
 
IdxPairDataSet data_
 

Friends

class DataPointSet
 
class PosVecDataSet
 

Detailed Description

uses an IdxPairDataSet to hold arrays of floats

When you construct a IdxPairValueSet, you must provide the number of values (which can be changed later) and whether duplicate IdxPairs are allowed. In the set, new uninitialized values will be set to mUdf(float).

Note: if one of the values is Z, make it the first value. Not that this is enforced by the set, but it will be assumed sooner or later.

Member Typedef Documentation

Constructor & Destructor Documentation

Pos::IdxPairValueSet::IdxPairValueSet ( int  nr_vals,
bool  allow_dupl_idxpairs 
)
virtual Pos::IdxPairValueSet::~IdxPairValueSet ( )
inlinevirtual

Member Function Documentation

SPos Pos::IdxPairValueSet::add ( const IdxPair ,
const float *  vs = 0 
)

Either pass sufficient data or pass null.

SPos Pos::IdxPairValueSet::add ( const DataRow )

Wrong-sized will be handled correctly.

void Pos::IdxPairValueSet::add ( const PosInfo::CubeData )
SPos Pos::IdxPairValueSet::add ( const PairVal )
SPos Pos::IdxPairValueSet::add ( const IdxPair ,
float   
)
SPos Pos::IdxPairValueSet::add ( const IdxPair ,
double   
)
SPos Pos::IdxPairValueSet::add ( const IdxPair ,
float  ,
float   
)
SPos Pos::IdxPairValueSet::add ( const IdxPair ,
const TypeSet< float > &   
)
void Pos::IdxPairValueSet::allowDuplicateIdxPairs ( bool  yn)
inline
bool Pos::IdxPairValueSet::allowsDuplicateIdxPairs ( ) const
inline
bool Pos::IdxPairValueSet::append ( const IdxPairValueSet oth)
inline
Interval<IdxType> Pos::IdxPairValueSet::colRange ( IdxType  row = -1) const
inline
void Pos::IdxPairValueSet::copyStructureFrom ( const IdxPairValueSet )

will also empty this set

Interval<IdxType> Pos::IdxPairValueSet::crlRange ( IdxType  inl = -1) const
inline
void Pos::IdxPairValueSet::extend ( const IdxPairDelta stepout,
const IdxPairStep ,
bool  avoiddups = true 
)
void Pos::IdxPairValueSet::fillPar ( IOPar ,
const char *  key 
) const
SPos Pos::IdxPairValueSet::find ( const IdxPair ip) const
inline
SPos Pos::IdxPairValueSet::findOccurrence ( const IdxPair ip,
int  occ = 0 
) const
inline
IdxPair Pos::IdxPairValueSet::firstIdxPair ( ) const
inline
Interval<IdxType> Pos::IdxPairValueSet::firstRange ( ) const
inline
void Pos::IdxPairValueSet::get ( const SPos ,
float *  v = 0,
int  mxnrvals = -1 
) const
void Pos::IdxPairValueSet::get ( const SPos ,
IdxPair ,
float *  v = 0,
int  mxnrv = -1 
) const
void Pos::IdxPairValueSet::get ( const SPos ,
DataRow  
) const
void Pos::IdxPairValueSet::get ( const SPos ,
PairVal  
) const
void Pos::IdxPairValueSet::get ( const SPos ,
IdxPair ,
float &   
) const
void Pos::IdxPairValueSet::get ( const SPos ,
IdxPair ,
float &  ,
float &   
) const
void Pos::IdxPairValueSet::get ( const SPos ,
IdxPair ,
TypeSet< float > &  ,
int  mxnrvals = -1 
) const
void Pos::IdxPairValueSet::get ( const SPos ,
TypeSet< float > &  ,
int  maxnrvals = -1 
) const
void Pos::IdxPairValueSet::getColumn ( int  valnr,
TypeSet< float > &  ,
bool  incudf 
) const
bool Pos::IdxPairValueSet::getFrom ( od_istream ,
Pos::GeomID  = mUdf(Pos::GeomID) 
)

detects/converts coords if geomid passed

IdxPair Pos::IdxPairValueSet::getIdxPair ( const SPos spos) const
inline
SPos Pos::IdxPairValueSet::getPos ( GlobIdxType  global_idx) const
inline
float Pos::IdxPairValueSet::getVal ( const SPos pos,
int  valnr 
) const

Direct access to value arrays.

float* Pos::IdxPairValueSet::getVals ( const SPos )

Direct access to value arrays.

const float* Pos::IdxPairValueSet::getVals ( const SPos ) const

Direct access to value arrays.

float* Pos::IdxPairValueSet::gtVals ( const SPos spos)
inlineprotected
const float* Pos::IdxPairValueSet::gtVals ( const SPos spos) const
inlineprotected
bool Pos::IdxPairValueSet::hasCol ( IdxType  col) const
inline
bool Pos::IdxPairValueSet::hasCrl ( IdxType  crl) const
inline
bool Pos::IdxPairValueSet::hasDuplicateIdxPairs ( ) const
inline
bool Pos::IdxPairValueSet::hasFirst ( IdxType  inl) const
inline
bool Pos::IdxPairValueSet::hasInl ( IdxType  inl) const
inline
bool Pos::IdxPairValueSet::hasRow ( IdxType  row) const
inline
bool Pos::IdxPairValueSet::hasSecond ( IdxType  crl) const
inline
bool Pos::IdxPairValueSet::haveDataRow ( const DataRow ) const
bool Pos::IdxPairValueSet::includes ( const IdxPair ip) const
inline
Interval<IdxType> Pos::IdxPairValueSet::inlRange ( ) const
inline
bool Pos::IdxPairValueSet::insertVal ( int  )
bool Pos::IdxPairValueSet::isEmpty ( ) const
inline
bool Pos::IdxPairValueSet::isValid ( const IdxPair spos) const
inline
bool Pos::IdxPairValueSet::next ( SPos spos,
bool  skip_dupl_idxpairs = false 
) const
inline
ArrIdxType Pos::IdxPairValueSet::nrCols ( IdxType  row) const
inline
ArrIdxType Pos::IdxPairValueSet::nrCrls ( IdxType  inl) const
inline
ArrIdxType Pos::IdxPairValueSet::nrDuplicateIdxPairs ( ) const
inline
IdxType Pos::IdxPairValueSet::nrFirst ( ) const
inline
ArrIdxType Pos::IdxPairValueSet::nrInls ( ) const
inline
ArrIdxType Pos::IdxPairValueSet::nrPos ( ArrIdxType  lineidx) const
inline
ArrIdxType Pos::IdxPairValueSet::nrRows ( ) const
inline
IdxType Pos::IdxPairValueSet::nrSecond ( IdxType  firstidx) const
inline
int Pos::IdxPairValueSet::nrVals ( ) const
inline
IdxPairValueSet& Pos::IdxPairValueSet::operator= ( const IdxPairValueSet )
bool Pos::IdxPairValueSet::prev ( SPos spos,
bool  skip_dupl_idxpairs = false 
) const
inline
bool Pos::IdxPairValueSet::putTo ( od_ostream ) const
void Pos::IdxPairValueSet::randomSubselect ( od_int64  maxsz)
inline
void Pos::IdxPairValueSet::remove ( const IdxPairValueSet oth)
inline
void Pos::IdxPairValueSet::remove ( const SPos spos)
inline
void Pos::IdxPairValueSet::remove ( const TypeSet< SPos > &  torem)
inline
void Pos::IdxPairValueSet::remove ( const TrcKeySampling hrg,
bool  inside 
)
inline
void Pos::IdxPairValueSet::removeDuplicateIdxPairs ( )
inline
void Pos::IdxPairValueSet::removeRange ( int  valnr,
const Interval< float > &  ,
bool  inside = true 
)
void Pos::IdxPairValueSet::removeVal ( int  )

Will remove entire 'column'.

Interval<IdxType> Pos::IdxPairValueSet::rowRange ( ) const
inline
Interval<IdxType> Pos::IdxPairValueSet::secondRange ( IdxType  frstidx = -1) const
inline
void Pos::IdxPairValueSet::set ( SPos  ,
const float *  vs = 0 
)

null = set to undef no checks on data size (how could there be?) and also not whether SPos is actually in set! in doubt, use isValid(SPos) .

void Pos::IdxPairValueSet::set ( const SPos ,
float   
)
void Pos::IdxPairValueSet::set ( const SPos ,
float  ,
float   
)
void Pos::IdxPairValueSet::set ( const SPos ,
const TypeSet< float > &   
)
void Pos::IdxPairValueSet::setEmpty ( )
inline
bool Pos::IdxPairValueSet::setNrVals ( int  )
GlobIdxType Pos::IdxPairValueSet::totalSize ( ) const
inline
void Pos::IdxPairValueSet::usePar ( const IOPar ,
const char *  key 
)
Interval<float> Pos::IdxPairValueSet::valRange ( int  valnr) const

Friends And Related Function Documentation

friend class DataPointSet
friend
friend class PosVecDataSet
friend

Member Data Documentation

IdxPairDataSet Pos::IdxPairValueSet::data_
protected
const int Pos::IdxPairValueSet::nrvals_
protected

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