 |
OpendTect
6.6
|
Go to the documentation of this file.
13 #include "generalmod.h"
18 namespace PosInfo {
class CubeData; }
81 {
return i == oth.
i && j == oth.
j; }
83 {
return i != oth.
i || j != oth.
j; }
85 inline bool operator<(
const SPos&)
const;
86 inline bool isValid()
const {
return i > -1 && j > -1; }
93 bool manage_data=
true);
98 inline bool isEmpty()
const {
return frsts_.isEmpty(); }
116 {
return findFirst(ip); }
118 {
return findOccurrence(ip,0); }
120 bool next(
SPos&,
bool skip_duplicate_idxpairs=
false)
const;
121 bool prev(
SPos&,
bool skip_duplicate_idxpairs=
false)
const;
135 {
set( findFirst(ip), obj ); }
145 {
return find(ip).j > -1; }
181 {
return secondRange(inl); }
183 {
return secondRange(row); }
187 const void* initwith=0);
204 { objs_.allowNull(
true); }
243 {
return frsts_[pos.
i]; }
245 {
return gtScndSet(pos)[pos.
j]; }
247 {
return IdxPair( gtFrst(pos), gtScnd(pos) ); }
249 {
return *scndsets_[pos.
i]; }
251 {
return *scndsets_[pos.
i]; }
253 {
return *objdatas_[pos.
i]; }
255 {
return *objdatas_[pos.
i]; }
257 {
return *scndsets_[idx]; }
259 {
return *scndsets_[idx]; }
261 {
return *objdatas_[idx]; }
263 {
return *objdatas_[idx]; }
272 return i == oth.
i &&
j > oth.
j;
280 return i == oth.
i && j < oth.
j;
const ObjData & gtObjData(const SPos &pos) const
Definition: posidxpairdataset.h:254
ObjSzType objSize() const
Definition: posidxpairdataset.h:103
Definition: posidxpairdataset.h:198
Position info for an entire 3D cube. The LineData's are not sorted.
Definition: posinfo.h:95
SPos getPos(GlobIdxType) const
Very slow.
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:35
ArrIdxType nrCrls(IdxType inl) const
Definition: posidxpairdataset.h:171
const void * getObj(SPos) const
void putObj(bool, ArrIdxType, ObjSzType, const void *)
bool hasInl(IdxType inl) const
Definition: posidxpairdataset.h:174
bool setObjSize(ObjSzType sz, ObjSzType offs_in_objs=-1, const void *initwith=0)
bool hasCrl(IdxType crl) const
Definition: posidxpairdataset.h:175
IdxSet frsts_
Definition: posidxpairdataset.h:231
void randomSubselect(GlobIdxType maxsz)
void decrObjSize(ObjSzType orgsz, ObjSzType newsz, ObjSzType at_offs)
bool hasCol(IdxType col) const
Definition: posidxpairdataset.h:177
SPos update(const IdxPair &, const void *obj=0)
bool includes(const IdxPair &ip) const
Definition: posidxpairdataset.h:144
Position.
Definition: commontypes.h:78
const void * get(SPos, IdxPair &) const
bool managesData() const
Definition: posidxpairdataset.h:104
Interval< IdxType > firstRange() const
bool operator<(const SPos &) const
Definition: posidxpairdataset.h:276
IdxPairDataSet(const IdxPairDataSet &)
void remove(SPos)
afterwards, input SPos may be invalid
void removeObj(bool, ArrIdxType, ObjSzType)
const ObjData & gtObjData(ArrIdxType idx) const
Definition: posidxpairdataset.h:262
#define od_int64
Definition: plftypes.h:35
#define mExpClass(module)
Definition: commondefs.h:177
void extend(const IdxPairDelta &stepout, const IdxPairStep &, EntryCreatedFn fn=0)
Adds only IdxPair postions not yet in set.
bool incrObjSize(ObjSzType, ObjSzType, ObjSzType, const void *)
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
IdxSet & gtScndSet(ArrIdxType idx)
Definition: posidxpairdataset.h:256
void set(SPos, const void *obj=0)
ArrIdxType nrFirst() const
Definition: posidxpairdataset.h:142
bool hasSecond(IdxType) const
Interval< IdxType > inlRange() const
Definition: posidxpairdataset.h:178
SPos findOccurrence(const IdxPair &, int occ=0) const
Interval< IdxType > colRange(IdxType row=-1) const
Definition: posidxpairdataset.h:182
bool hasRow(IdxType row) const
Definition: posidxpairdataset.h:176
bool isValid(const IdxPair &) const
ArrIdxType nrSecond(IdxType firstidx) const
void reset()
Definition: posidxpairdataset.h:79
bool incrObjSize(ObjSzType, ObjSzType offs=-1, const void *=0)
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
Index_Type IdxType
Definition: idxpair.h:33
A sorted set of IdxPairs and associated data buffer.
Definition: posidxpairdataset.h:61
const ObjSzType objsz_
Definition: posidxpairdataset.h:227
void remove(const IdxPairDataSet &)
static ArrIdxType findIndexFor(const IdxSet &, IdxType, bool *found=0)
void allowDuplicateIdxPairs(bool)
bool allowsDuplicateIdxPairs() const
Definition: posidxpairdataset.h:105
Interval< IdxType > secondRange(IdxType firsidx=-1) const
ArrIdxType nrDuplicateIdxPairs() const
SPos find(const IdxPair &ip) const
Definition: posidxpairdataset.h:115
bool hasDuplicateIdxPairs() const
void copyStructureFrom(const IdxPairDataSet &)
will also empty this set
IdxType gtScnd(const SPos &pos) const
Definition: posidxpairdataset.h:244
IdxPair getIdxPair(SPos) const
bool allowdup_
Definition: posidxpairdataset.h:229
void remove(const TypeSet< SPos > &)
const BufferString * find(const BufferStringSet &, const char *)
ArrIdxType i
Definition: posidxpairdataset.h:88
bool dump(od_ostream &, bool binary) const
SPos(ArrIdxType ii=-1, ArrIdxType jj=-1)
Definition: posidxpairdataset.h:77
bool next(SPos &, bool skip_duplicate_idxpairs=false) const
od_int64 BufSzType
Definition: posidxpairdataset.h:195
ArrIdxType nrInls() const
Definition: posidxpairdataset.h:170
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
bool addObjSpace(bool, ArrIdxType, ObjSzType)
const IdxSet & gtScndSet(const SPos &pos) const
Definition: posidxpairdataset.h:250
const void * gtObj(const SPos &) const
TypeSet< IdxType >::size_type ArrIdxType
Definition: posidxpairdataset.h:65
ArrIdxType nrCols(IdxType row) const
Definition: posidxpairdataset.h:173
IdxPair gtIdxPair(const SPos &pos) const
Definition: posidxpairdataset.h:246
BufSzType bufsz_
Definition: posidxpairdataset.h:222
IdxPairDataSet(ObjSzType, bool allow_duplicate_idxs, bool manage_data=true)
unsigned char BufType
Definition: posidxpairdataset.h:201
~ObjData()
Definition: posidxpairdataset.h:206
ObjData & gtObjData(const SPos &pos)
Definition: posidxpairdataset.h:252
BufType * buf_
Definition: posidxpairdataset.h:221
ObjectSet< IdxSet > scndsets_
Definition: posidxpairdataset.h:232
void set(T &_to, const F &fr)
template based type conversion
Definition: convert.h:27
void putObj(const SPos &, const void *)
Interval< IdxType > crlRange(IdxType inl=-1) const
Definition: posidxpairdataset.h:180
IdxPair::IdxType IdxType
Definition: posidxpairdataset.h:64
bool isValid() const
Definition: posidxpairdataset.h:86
void decrObjSize(ObjSzType, ObjSzType offs=-1)
bool hasFirst(IdxType) const
GlobIdxType totalSize() const
od_int64 GlobIdxType
Definition: posidxpairdataset.h:67
void set(const IdxPair &ip, const void *obj=0)
May do the wrong thing if you have duplicates.
Definition: posidxpairdataset.h:134
void remove(const TrcKeySampling &hrg, bool inside)
bool manageBufCapacity(ObjSzType)
const void * getObj(bool, ArrIdxType, ObjSzType) const
bool slurp(od_istream &, bool binary)
void removeDuplicateIdxPairs()
Position info, often segmented.
Definition: posinfo.h:40
void add(const PosInfo::CubeData &, EntryCreatedFn fn=0)
Adds only IdxPair postions not yet in set.
bool prev(SPos &, bool skip_duplicate_idxpairs=false) const
bool addObj(SPos &, IdxType, const void *)
Set Position: position in IdxPairDataSet.
Definition: posidxpairdataset.h:76
virtual ~IdxPairDataSet()
ArrIdxType nrRows() const
Definition: posidxpairdataset.h:172
ObjData()
Definition: posidxpairdataset.h:203
bool operator>(const ObjectWithName &obj1, const ObjectWithName &obj2)
Definition: namedobj.h:95
ObjectSet< ObjData > objdatas_
Definition: posidxpairdataset.h:233
ArrIdxType nrPos(ArrIdxType lineidx) const
bool operator>(const SPos &) const
Definition: posidxpairdataset.h:268
IdxType gtFrst(const SPos &pos) const
Definition: posidxpairdataset.h:242
IdxPair with position indices; base class for BinID et al.
Definition: posidxpair.h:29
IdxPair firstIdxPair() const
when empty returns udf()
const IdxSet & gtScndSet(ArrIdxType idx) const
Definition: posidxpairdataset.h:258
ObjData & gtObjData(ArrIdxType idx)
Definition: posidxpairdataset.h:260
SPos findFirst(const IdxPair &ip) const
Definition: posidxpairdataset.h:117
const bool mandata_
Definition: posidxpairdataset.h:228
Interval of values.
Definition: commontypes.h:30
void(* EntryCreatedFn)(IdxPairDataSet &, int spos_i, int spos_j)
Definition: posidxpairdataset.h:26
od_int64 ObjSzType
Definition: posidxpairdataset.h:66
IdxSet & gtScndSet(const SPos &pos)
Definition: posidxpairdataset.h:248
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 addEntry(const Pos::IdxPair &, const void *, SPos &)
ObjectSet< const void > objs_
Definition: posidxpairdataset.h:219
SPos add(const IdxPair &, const void *obj=0)
If returned SPos is not valid memory was full.
Interval< IdxType > rowRange() const
Definition: posidxpairdataset.h:179
bool isEmpty() const
Definition: posidxpairdataset.h:98
Sets of (small) copyable elements.
Definition: commontypes.h:29
ArrIdxType j
Definition: posidxpairdataset.h:88
bool append(const IdxPairDataSet &)
TypeSet< IdxType > IdxSet
Definition: posidxpairdataset.h:194
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021