CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
dindex.cc
Go to the documentation of this file.
1// -*- C++ -*-
12#include "ranges/ranges.h"
13
14namespace CNORXZ
15{
18 mI(i.mI->copy())
19 {}
20
23 mI(i.mI)
24 {
25 i.mI = nullptr;
26 }
27
29 {
31 mI = i.mI->copy();
32 IB::mPos = mI->pos();
33 return *this;
34 }
35
37 {
39 mI = i.mI;
40 IB::mPos = mI->pos();
41 i.mI = nullptr;
42 return *this;
43 }
44
47 mI(i)
48 {}
49
52 {
53 *this = r->begin();
54 *this = lexpos;
55 }
56
58 {
59 *mI = lexpos;
60 IB::mPos = mI->pos();
61 return *this;
62 }
63
65 {
66 ++(*mI);
67 IB::mPos = mI->pos();
68 return *this;
69 }
70
72 {
73 --(*mI);
74 IB::mPos = mI->pos();
75 return *this;
76 }
77
79 {
80 return (*mI) + n;
81 }
82
84 {
85 return (*mI) - n;
86 }
87
89 {
90 return (*mI) - (*i.mI);
91 }
92
94 {
95 (*mI) += n;
96 IB::mPos = mI->pos();
97 return *this;
98 }
99
101 {
102
103 IB::mPos = mI->pos();
104 return *this;
105 }
106
108 {
109 return mI->lex();
110 }
111
113 {
114 return mI->pmax();
115 }
116
118 {
119 return mI->lmax();
120 }
121
123 {
124 return mI->id();
125 }
126
128 {
129 return *(*mI);
130 }
131
133 {
134 return mI->dim();
135 }
136
138 {
139 return mI->range();
140 }
141
143 {
144 return mI->stepSize(id);
145 }
146 /*
147 Vector<XIndexPtr> DIndex::pack() const
148 {
149 return mI->pack();
150 }
151
152 Vector<SizeT> DIndex::blockSizes() const
153 {
154 return mI->blockSizes();
155 }
156
157 DIndex& DIndex::setBlockSizes(const Vector<SizeT>& bs)
158 {
159 mI->setBlockSizes(bs);
160 return *this;
161 }
162 */
164 {
165 return mI->stringMeta();
166 }
167
169 {
170 return mI->meta();
171 }
172
173 DIndex& DIndex::at(const DType& meta)
174 {
175 mI->at(meta);
176 IB::mPos = mI->pos();
177 return *this;
178 }
179
181 {
182 return mI->prange( end.xptr() );
183 }
184
186 {
187 return mI->deepFormat();
188 }
189
191 {
192 return mI->deepMax();
193 }
194
196 {
197 mI->reformat(f,s);
198 return *this;
199 }
200
202 {
203 return true;
204 }
205
206 const XIndexPtr& DIndex::xptr() const
207 {
208 return mI;
209 }
210}
String stringMeta() const
Definition dindex.cc:163
Vector< SizeT > deepFormat() const
Definition dindex.cc:185
DIndex & at(const DType &meta)
Definition dindex.cc:173
IndexId< 0 > id() const
Definition dindex.cc:122
DIndex & operator=(const DIndex &i)
Definition dindex.cc:28
DIndex & operator--()
Definition dindex.cc:71
RangePtr range() const
Definition dindex.cc:137
SizeT dim() const
Definition dindex.cc:132
UPos pmax() const
Definition dindex.cc:112
const XIndexPtr & xptr() const
Definition dindex.cc:206
bool formatIsTrivial() const
Definition dindex.cc:201
RangePtr prange(const DIndex &end) const
Definition dindex.cc:180
DIndex(const DIndex &i)
Definition dindex.cc:16
DType meta() const
Definition dindex.cc:168
DIndex & operator++()
Definition dindex.cc:64
UPos stepSize(const IndexId< 0 > &id) const
Definition dindex.cc:142
DIndex & operator-=(Int n)
Definition dindex.cc:100
DType operator*() const
Definition dindex.cc:127
DIndex operator-(Int n) const
Definition dindex.cc:83
DIndex & operator+=(Int n)
Definition dindex.cc:93
Vector< SizeT > deepMax() const
Definition dindex.cc:190
UPos lmax() const
Definition dindex.cc:117
SizeT lex() const
Definition dindex.cc:107
DIndex operator+(Int n) const
Definition dindex.cc:78
DIndex & reformat(const Vector< SizeT > &f, const Vector< SizeT > &s)
Definition dindex.cc:195
std::string String
Definition types.h:42
uint64_t SizeT
Definition types.h:38
Sptr< RangeBase > RangePtr
Definition types.h:157
Sptr< XIndexBase > XIndexPtr
Definition types.h:216
std::vector< T, Allocator< T > > Vector
Definition types.h:310
int32_t Int
Definition types.h:36
Sptr< Range > rangeCast(const RangePtr r)
Ranges main header.