 |
OpendTect
6.6
|
Go to the documentation of this file.
14 #include "generalmod.h"
19 namespace PosInfo {
class CubeData; }
25 template <
class IPT,
class FT>
class ValueIdxPair;
26 template <
class IPT,
class FT>
class IdxPairValues;
76 bool allow_duplicate_idxpairs);
82 { allowdup_ = yn;
if ( !yn ) removeDuplicateIdxPairs();}
97 SPos(
int ii=-1,
int jj=-1 )
101 {
return i == p.
i && j == p.
j; }
103 {
return i != p.
i || j != p.
j; }
105 {
if ( i>p.
i )
return true;
return i==p.
i && j>p.
j; }
107 {
if ( i<p.
i )
return true;
return i==p.
i && j<p.
j; }
108 inline bool isValid()
const {
return i > -1 && j > -1; }
114 {
return findOccurrence( ip, 0 ); }
121 bool next(
SPos&,
bool skip_duplicate_idxpairs=
false)
const;
122 bool prev(
SPos&,
bool skip_duplicate_idxpairs=
false)
const;
126 int mxnrvals=-1)
const;
141 inline int nrVals()
const {
return nrvals_; }
142 inline int nrFirst()
const {
return frsts_.size(); }
144 inline bool isEmpty()
const {
return nrFirst() < 1; }
146 {
return find(ip).j > -1; }
194 int maxnrvals=-1)
const;
212 {
return valsets_[pos.
i]->arr() + nrvals_*pos.
j; }
215 {
return valsets_[pos.
i]->arr() + nrvals_*pos.
j; }
219 {
return getVals(pos)[valnr]; }
224 inline int nrInls()
const {
return nrFirst(); }
226 inline int nrRows()
const {
return nrFirst(); }
235 {
return secondRange(inl); }
237 {
return secondRange(row); }
254 {
return frsts_[pos.
i]; }
256 {
return (*scndsets_[pos.
i])[pos.
j]; }
258 {
return *scndsets_[pos.
i]; }
260 {
return *scndsets_[pos.
i]; }
262 {
return *valsets_[pos.
i]; }
264 {
return *valsets_[pos.
i]; }
266 {
return *scndsets_[idx]; }
268 {
return *scndsets_[idx]; }
270 {
return *valsets_[idx]; }
272 {
return *valsets_[idx]; }
void remove(const TypeSet< SPos > &)
bool hasFirst(IdxType) const
Position info for an entire 3D cube. The LineData's are not sorted.
Definition: posinfo.h:95
void set(const SPos &, float, float)
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:35
void allowDuplicateIdxPairs(bool yn)
Definition: posidxpairvalset.h:81
void remove(const TrcKeySampling &hrg, bool inside)
int nrDuplicateIdxPairs() const
bool hasRow(IdxType row) const
Definition: posidxpairvalset.h:230
int nrSecond(IdxType firstidx) const
int nrPos(int lineidx) const
nth line in the set
bool prev(SPos &, bool skip_duplicate_idxpairs=false) const
bool setNrVals(int, bool kp_data=true)
virtual ~IdxPairValueSet()
SPos getPos(od_int64 global_idx) const
Slow. And no check on idx in range.
bool includes(const DataRow &) const
IdxPairValueSet(const IdxPairValueSet &)
Position.
Definition: commontypes.h:78
const int nrvals_
Definition: posidxpairvalset.h:241
float * getVals(const SPos &pos)
Direct access to value arrays.
Definition: posidxpairvalset.h:211
bool append(const IdxPairValueSet &)
void reset()
Definition: posidxpairvalset.h:99
Interval< float > valRange(int valnr) const
Set of pointers to objects.
Definition: commontypes.h:31
void set(SPos, const float *vs=0)
void randomSubselect(od_int64 maxnr)
position in IdxPairValueSet; an iterator.
Definition: posidxpairvalset.h:96
TypeSet< IdxType > frsts_
Definition: posidxpairvalset.h:242
void fillPar(IOPar &, const char *key) const
#define od_int64
Definition: plftypes.h:35
IdxType getScnd(const SPos &pos) const
Definition: posidxpairvalset.h:255
Interval< int > inlRange() const
Definition: posidxpairvalset.h:232
#define mExpClass(module)
Definition: commondefs.h:177
void removeVal(int)
Will remove entire 'column'.
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
void removeRange(int valnr, const Interval< float > &, bool inside=true)
int firstAtIdx(int firstidx) const
int secondIdx(int firstidx, int) const
od_int64 totalSize() const
void remove(const IdxPairValueSet &)
Data set consisting of data vectors.
Definition: posvecdataset.h:32
bool allowsDuplicateIdxPairs() const
Definition: posidxpairvalset.h:83
void get(const SPos &, DataRow &) const
int nrVals() const
Definition: posidxpairvalset.h:141
IdxPair getIdxPair(const SPos &) const
int nrFirst() const
Definition: posidxpairvalset.h:142
bool hasInl(IdxType inl) const
Definition: posidxpairvalset.h:228
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
SPos findOccurrence(const IdxPair &, int occ=0) const
Index_Type IdxType
Definition: idxpair.h:33
SPos add(const PairVal &)
SPos add(const IdxPair &, double)
IdxPair firstIdxPair() const
if empty, returns IdxPair::udf()
void add(const PosInfo::CubeData &)
IdxPair::IdxType IdxType
Definition: posidxpairvalset.h:71
ObjectSet< TypeSet< float > > valsets_
Definition: posidxpairvalset.h:244
SPos findNearest(const IdxPair &) const
IdxPairValueSet(int nr_vals, bool allow_duplicate_idxpairs)
SPos add(const IdxPair &, const float *vs=0)
Either pass sufficient data or pass null.
void get(const SPos &, PairVal &) const
void remove(const SPos &)
afterwards, SPos may be invalid
bool getFrom(od_istream &, Pos::GeomID=mUdf(Pos::GeomID))
detects/converts coords if geomid passed
int nrCrls(IdxType inl) const
Definition: posidxpairvalset.h:225
Set of data points with group selection.
Definition: datapointset.h:48
bool putTo(od_ostream &) const
bool hasCol(IdxType col) const
Definition: posidxpairvalset.h:231
bool operator<(const SPos &p) const
Definition: posidxpairvalset.h:106
bool includes(const IdxPair &ip) const
Definition: posidxpairvalset.h:145
const BufferString * find(const BufferStringSet &, const char *)
void sortDuplicateIdxPairs(int value_nr, bool ascending=true)
TypeSet< float > & getValSet(int idx)
Definition: posidxpairvalset.h:269
bool operator>(const SPos &p) const
Definition: posidxpairvalset.h:104
IdxType getFrst(const SPos &pos) const
Definition: posidxpairvalset.h:253
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
SPos add(const IdxPair &, float, float)
void copyStructureFrom(const IdxPairValueSet &)
will also empty this set
int nrInls() const
Definition: posidxpairvalset.h:224
void removeDuplicateIdxPairs()
SPos find(const IdxPair &ip) const
Definition: posidxpairvalset.h:113
IdxPairValues< IdxPair, float > DataRow
Definition: posidxpairvalset.h:73
float getVal(const SPos &pos, int valnr) const
< Direct access to value arrays.
Definition: posidxpairvalset.h:217
SPos add(const IdxPair &, const TypeSet< float > &)
void set(const SPos &, float)
Interval< IdxType > secondRange(IdxType firsidx=-1) const
const TypeSet< IdxType > & getScndSet(int idx) const
Definition: posidxpairvalset.h:267
SPos add(const IdxPair &, float)
int j
Definition: posidxpairvalset.h:110
bool hasDuplicateIdxPairs() const
void get(const SPos &, IdxPair &, float &, float &) const
bool haveDataRow(const DataRow &) const
int nrRows() const
Definition: posidxpairvalset.h:226
bool isEmpty() const
Definition: posidxpairvalset.h:144
const TypeSet< IdxType > & getScndSet(const SPos &pos) const
Definition: posidxpairvalset.h:259
void getSecondsAtIdx(int firstidx, TypeSet< int > &) const
int i
Definition: posidxpairvalset.h:110
bool hasSecond(IdxType) const
TypeSet< IdxType > & getScndSet(const SPos &pos)
Definition: posidxpairvalset.h:257
int nrCols(IdxType row) const
Definition: posidxpairvalset.h:227
void get(const SPos &, IdxPair &, float *v=0, int mxnrvals=-1) const
A sorted set of IdxPairs and associated values.
Definition: posidxpairvalset.h:68
void sortPart(TypeSet< IdxType > &, TypeSet< float > &, int, int, int, bool)
const float * getVals(const SPos &pos) const
Direct access to value arrays.
Definition: posidxpairvalset.h:214
void getColumn(int valnr, TypeSet< float > &, bool incudf) const
Position info, often segmented.
Definition: posinfo.h:40
ObjectSet< TypeSet< IdxType > > scndsets_
Definition: posidxpairvalset.h:243
TypeSet< float > & getValSet(const SPos &pos)
Definition: posidxpairvalset.h:261
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
void get(const SPos &, IdxPair &, float &) const
Interval< IdxType > firstRange() const
SPos(int ii=-1, int jj=-1)
Definition: posidxpairvalset.h:97
bool isValid(const IdxPair &) const
const TypeSet< float > & getValSet(const SPos &pos) const
Definition: posidxpairvalset.h:263
void updNearest(const IdxPair &, const SPos &, od_int64 &, SPos &) const
IdxPair with position indices; base class for BinID et al.
Definition: posidxpair.h:29
bool next(SPos &, bool skip_duplicate_idxpairs=false) const
const TypeSet< float > & getValSet(int idx) const
Definition: posidxpairvalset.h:271
void usePar(const IOPar &, const char *key)
void extend(const IdxPairDelta &stepout, const IdxPairStep &)
Adds only IdxPair postions not yet in set.
bool allowdup_
Definition: posidxpairvalset.h:245
Interval of values.
Definition: commontypes.h:30
TypeSet< IdxType > & getScndSet(int idx)
Definition: posidxpairvalset.h:265
Interval< int > crlRange(IdxType inl=-1) const
Definition: posidxpairvalset.h:234
IdxPair with a value.
Definition: posidxpairvalue.h:29
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
void set(const SPos &, const TypeSet< float > &)
void get(const SPos &, IdxPair &, TypeSet< float > &, int maxnrvals=-1) const
max == -1 => all
bool isValid() const
Definition: posidxpairvalset.h:108
Interval< int > rowRange() const
Definition: posidxpairvalset.h:233
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
void addNew(SPos &, IdxType, const float *)
SPos findNearestOnFirst(int frst, int scnd) const
Index_Type GeomID
Definition: commontypes.h:87
ValueIdxPair< IdxPair, float > PairVal
Definition: posidxpairvalset.h:72
SPos add(const DataRow &)
Wrong-sized will be handled correctly.
IdxPair with 0-N values.
Definition: posidxpairvalue.h:22
bool hasCrl(IdxType crl) const
Definition: posidxpairvalset.h:229
Interval< int > colRange(IdxType row=-1) const
Definition: posidxpairvalset.h:236
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021