00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00028 #ifndef matpackVI_h
00029 #define matpackVI_h
00030
00031 #include "matpackV.h"
00032
00033 #define CHECK(x) assert( 0 <= x ); assert( x < m ## x ## r.mextent )
00034 #define OFFSET(x) m ## x ## r.mstart + x * m ## x ## r.mstride
00035
00038 class Iterator6D {
00039 public:
00040
00042 Iterator6D() : msv(), mstride(0) { }
00043
00045 Iterator6D(const Iterator6D& o) : msv(o.msv), mstride(o.mstride)
00046 { }
00047
00049 Iterator6D(const Tensor5View& x, Index stride) : msv(x), mstride(stride)
00050 { }
00051
00052
00054 Iterator6D& operator++() { msv.mdata += mstride; return *this; }
00055
00060 bool operator!=(const Iterator6D& other) const
00061 { if ( msv.mdata +
00062 msv.msr.mstart +
00063 msv.mbr.mstart +
00064 msv.mpr.mstart +
00065 msv.mrr.mstart +
00066 msv.mcr.mstart
00067 !=
00068 other.msv.mdata +
00069 other.msv.msr.mstart +
00070 other.msv.mbr.mstart +
00071 other.msv.mpr.mstart +
00072 other.msv.mrr.mstart +
00073 other.msv.mcr.mstart )
00074 return true;
00075 else
00076 return false;
00077 }
00078
00081 Tensor5View* operator->() { return &msv; }
00082
00084 Tensor5View& operator*() { return msv; }
00085
00086 private:
00088 Tensor5View msv;
00090 Index mstride;
00091 };
00092
00094 class ConstIterator6D {
00095 public:
00096
00098 ConstIterator6D() : msv(), mstride(0) { }
00099
00101 ConstIterator6D(const ConstIterator6D& o) : msv(o.msv), mstride(o.mstride)
00102 { }
00103
00105 ConstIterator6D(const ConstTensor5View& x, Index stride) : msv(x), mstride(stride)
00106 { }
00107
00108
00110 ConstIterator6D& operator++() { msv.mdata += mstride; return *this; }
00111
00116 bool operator!=(const ConstIterator6D& other) const
00117 { if ( msv.mdata +
00118 msv.msr.mstart +
00119 msv.mbr.mstart +
00120 msv.mpr.mstart +
00121 msv.mrr.mstart +
00122 msv.mcr.mstart
00123 !=
00124 other.msv.mdata +
00125 other.msv.msr.mstart +
00126 other.msv.mbr.mstart +
00127 other.msv.mpr.mstart +
00128 other.msv.mrr.mstart +
00129 other.msv.mcr.mstart )
00130 return true;
00131 else
00132 return false;
00133 }
00134
00137 const ConstTensor5View* operator->() const { return &msv; }
00138
00140 const ConstTensor5View& operator*() const { return msv; }
00141
00142 private:
00144 ConstTensor5View msv;
00146 Index mstride;
00147 };
00148
00149
00150
00151 class Tensor6;
00152
00153
00167 class ConstTensor6View {
00168 public:
00169
00170 Index nvitrines() const;
00171 Index nshelves() const;
00172 Index nbooks() const;
00173 Index npages() const;
00174 Index nrows() const;
00175 Index ncols() const;
00176
00177
00178
00179
00180
00181 ConstTensor6View operator()( const Range& v, const Range& s, const Range& b,
00182 const Range& p, const Range& r, const Range& c) const;
00183
00184
00185
00186 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00187 const Range& p, const Range& r, Index c) const;
00188
00189 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00190 const Range& p, Index r, const Range& c) const;
00191
00192 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00193 Index p, const Range& r, const Range& c) const;
00194
00195 ConstTensor5View operator()( const Range& v, const Range& s, Index b,
00196 const Range& p, const Range& r, const Range& c) const;
00197
00198 ConstTensor5View operator()( const Range& v, Index s, const Range& b,
00199 const Range& p, const Range& r, const Range& c) const;
00200
00201 ConstTensor5View operator()( Index v, const Range& s, const Range& b,
00202 const Range& p, const Range& r, const Range& c) const;
00203
00204
00205
00206 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00207 const Range& p, Index r, Index c) const;
00208
00209 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00210 Index p, const Range& r, Index c) const;
00211
00212 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00213 const Range& p, const Range& r, Index c) const;
00214
00215 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00216 const Range& p, const Range& r, Index c) const;
00217
00218 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00219 const Range& p, const Range& r, Index c) const;
00220
00221 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00222 Index p, Index r, const Range& c) const;
00223
00224 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00225 const Range& p, Index r, const Range& c) const;
00226
00227 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00228 const Range& p, Index r, const Range& c) const;
00229
00230 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00231 const Range& p, Index r, const Range& c) const;
00232
00233 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00234 Index p, const Range& r, const Range& c) const;
00235
00236 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00237 Index p, const Range& r, const Range& c) const;
00238
00239 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00240 Index p, const Range& r, const Range& c) const;
00241
00242 ConstTensor4View operator()( const Range& v, Index s, Index b,
00243 const Range& p, const Range& r, const Range& c) const;
00244
00245 ConstTensor4View operator()( Index v, const Range& s, Index b,
00246 const Range& p, const Range& r, const Range& c) const;
00247
00248 ConstTensor4View operator()( Index v, Index s, const Range& b,
00249 const Range& p, const Range& r, const Range& c) const;
00250
00251
00252
00253 ConstTensor3View operator()( const Range& v, const Range& s, const Range& b,
00254 Index p, Index r, Index c) const;
00255
00256 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00257 const Range& p, Index r, Index c) const;
00258
00259 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00260 const Range& p, Index r, Index c) const;
00261
00262 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00263 const Range& p, Index r, Index c) const;
00264
00265 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00266 Index p, const Range& r, Index c) const;
00267
00268 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00269 Index p, const Range& r, Index c) const;
00270
00271 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00272 Index p, const Range& r, Index c) const;
00273
00274 ConstTensor3View operator()( const Range& v, Index s, Index b,
00275 const Range& p, const Range& r, Index c) const;
00276
00277 ConstTensor3View operator()( Index v, const Range& s, Index b,
00278 const Range& p, const Range& r, Index c) const;
00279
00280 ConstTensor3View operator()( Index v, Index s, const Range& b,
00281 const Range& p, const Range& r, Index c) const;
00282
00283 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00284 Index p, Index r, const Range& c) const;
00285
00286 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00287 Index p, Index r, const Range& c) const;
00288
00289 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00290 Index p, Index r, const Range& c) const;
00291
00292 ConstTensor3View operator()( const Range& v, Index s, Index b,
00293 const Range& p, Index r, const Range& c) const;
00294
00295 ConstTensor3View operator()( Index v, const Range& s, Index b,
00296 const Range& p, Index r, const Range& c) const;
00297
00298 ConstTensor3View operator()( Index v, Index s, const Range& b,
00299 const Range& p, Index r, const Range& c) const;
00300
00301 ConstTensor3View operator()( const Range& v, Index s, Index b,
00302 Index p, const Range& r, const Range& c) const;
00303
00304 ConstTensor3View operator()( Index v, const Range& s, Index b,
00305 Index p, const Range& r, const Range& c) const;
00306
00307 ConstTensor3View operator()( Index v, Index s, const Range& b,
00308 Index p, const Range& r, const Range& c) const;
00309
00310 ConstTensor3View operator()( Index v, Index s, Index b,
00311 const Range& p, const Range& r, const Range& c) const;
00312
00313
00314
00315 ConstMatrixView operator()( Index v, Index s, Index b,
00316 Index p, const Range& r, const Range& c) const;
00317
00318 ConstMatrixView operator()( Index v, Index s, Index b,
00319 const Range& p, Index r, const Range& c) const;
00320
00321 ConstMatrixView operator()( Index v, Index s, const Range& b,
00322 Index p, Index r, const Range& c) const;
00323
00324 ConstMatrixView operator()( Index v, const Range& s, Index b,
00325 Index p, Index r, const Range& c) const;
00326
00327 ConstMatrixView operator()( const Range& v, Index s, Index b,
00328 Index p, Index r, const Range& c) const;
00329
00330 ConstMatrixView operator()( Index v, Index s, Index b,
00331 const Range& p, const Range& r, Index c) const;
00332
00333 ConstMatrixView operator()( Index v, Index s, const Range& b,
00334 Index p, const Range& r, Index c) const;
00335
00336 ConstMatrixView operator()( Index v, const Range& s, Index b,
00337 Index p, const Range& r, Index c) const;
00338
00339 ConstMatrixView operator()( const Range& v, Index s, Index b,
00340 Index p, const Range& r, Index c) const;
00341
00342 ConstMatrixView operator()( Index v, Index s, const Range& b,
00343 const Range& p, Index r, Index c) const;
00344
00345 ConstMatrixView operator()( Index v, const Range& s, Index b,
00346 const Range& p, Index r, Index c) const;
00347
00348 ConstMatrixView operator()( const Range& v, Index s, Index b,
00349 const Range& p, Index r, Index c) const;
00350
00351 ConstMatrixView operator()( Index v, const Range& s, const Range& b,
00352 Index p, Index r, Index c) const;
00353
00354 ConstMatrixView operator()( const Range& v, Index s, const Range& b,
00355 Index p, Index r, Index c) const;
00356
00357 ConstMatrixView operator()( const Range& v, const Range& s, Index b,
00358 Index p, Index r, Index c) const;
00359
00360
00361
00362 ConstVectorView operator()( Index v, Index s, Index b,
00363 Index p, Index r, const Range& c) const;
00364
00365 ConstVectorView operator()( Index v, Index s, Index b,
00366 Index p, const Range& r, Index c) const;
00367
00368 ConstVectorView operator()( Index v, Index s, Index b,
00369 const Range& p, Index r, Index c) const;
00370
00371 ConstVectorView operator()( Index v, Index s, const Range& b,
00372 Index p, Index r, Index c) const;
00373
00374 ConstVectorView operator()( Index v, const Range& s, Index b,
00375 Index p, Index r, Index c) const;
00376
00377 ConstVectorView operator()( const Range& v, Index s, Index b,
00378 Index p, Index r, Index c) const;
00379
00380
00381
00382 Numeric operator() ( Index v, Index s, Index b,
00383 Index p, Index r, Index c) const
00384 { CHECK(v);
00385 CHECK(s);
00386 CHECK(b);
00387 CHECK(p);
00388 CHECK(r);
00389 CHECK(c);
00390 return *(mdata +
00391 OFFSET(v) + OFFSET(s) + OFFSET(b) +
00392 OFFSET(p) + OFFSET(r) + OFFSET(c) );
00393 }
00394
00395
00396
00397 ConstIterator6D begin() const;
00398 ConstIterator6D end() const;
00399
00400
00401 virtual ~ConstTensor6View() {};
00402
00403
00404 friend class ConstIterator7D;
00405 friend class Tensor6View;
00406 friend class ConstTensor7View;
00407
00408
00409 ConstTensor6View(const ConstTensor5View& a);
00410
00411 protected:
00412
00413 ConstTensor6View();
00414 ConstTensor6View(Numeric *data,
00415 const Range& v, const Range& s, const Range& b,
00416 const Range& p, const Range& r, const Range& c);
00417 ConstTensor6View(Numeric *data,
00418 const Range& pv, const Range& ps, const Range& pb,
00419 const Range& pp, const Range& pr, const Range& pc,
00420 const Range& nv, const Range& ns, const Range& nb,
00421 const Range& np, const Range& nr, const Range& nc);
00422
00423
00424
00426 Range mvr;
00428 Range msr;
00430 Range mbr;
00432 Range mpr;
00434 Range mrr;
00436 Range mcr;
00438 Numeric *mdata;
00439 };
00440
00450 class Tensor6View : public ConstTensor6View {
00451 public:
00452
00453
00454
00455
00456
00457 ConstTensor6View operator()( const Range& v, const Range& s, const Range& b,
00458 const Range& p, const Range& r, const Range& c) const;
00459
00460
00461
00462 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00463 const Range& p, const Range& r, Index c) const;
00464
00465 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00466 const Range& p, Index r, const Range& c) const;
00467
00468 ConstTensor5View operator()( const Range& v, const Range& s, const Range& b,
00469 Index p, const Range& r, const Range& c) const;
00470
00471 ConstTensor5View operator()( const Range& v, const Range& s, Index b,
00472 const Range& p, const Range& r, const Range& c) const;
00473
00474 ConstTensor5View operator()( const Range& v, Index s, const Range& b,
00475 const Range& p, const Range& r, const Range& c) const;
00476
00477 ConstTensor5View operator()( Index v, const Range& s, const Range& b,
00478 const Range& p, const Range& r, const Range& c) const;
00479
00480
00481
00482 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00483 const Range& p, Index r, Index c) const;
00484
00485 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00486 Index p, const Range& r, Index c) const;
00487
00488 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00489 const Range& p, const Range& r, Index c) const;
00490
00491 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00492 const Range& p, const Range& r, Index c) const;
00493
00494 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00495 const Range& p, const Range& r, Index c) const;
00496
00497 ConstTensor4View operator()( const Range& v, const Range& s, const Range& b,
00498 Index p, Index r, const Range& c) const;
00499
00500 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00501 const Range& p, Index r, const Range& c) const;
00502
00503 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00504 const Range& p, Index r, const Range& c) const;
00505
00506 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00507 const Range& p, Index r, const Range& c) const;
00508
00509 ConstTensor4View operator()( const Range& v, const Range& s, Index b,
00510 Index p, const Range& r, const Range& c) const;
00511
00512 ConstTensor4View operator()( const Range& v, Index s, const Range& b,
00513 Index p, const Range& r, const Range& c) const;
00514
00515 ConstTensor4View operator()( Index v, const Range& s, const Range& b,
00516 Index p, const Range& r, const Range& c) const;
00517
00518 ConstTensor4View operator()( const Range& v, Index s, Index b,
00519 const Range& p, const Range& r, const Range& c) const;
00520
00521 ConstTensor4View operator()( Index v, const Range& s, Index b,
00522 const Range& p, const Range& r, const Range& c) const;
00523
00524 ConstTensor4View operator()( Index v, Index s, const Range& b,
00525 const Range& p, const Range& r, const Range& c) const;
00526
00527
00528
00529 ConstTensor3View operator()( const Range& v, const Range& s, const Range& b,
00530 Index p, Index r, Index c) const;
00531
00532 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00533 const Range& p, Index r, Index c) const;
00534
00535 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00536 const Range& p, Index r, Index c) const;
00537
00538 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00539 const Range& p, Index r, Index c) const;
00540
00541 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00542 Index p, const Range& r, Index c) const;
00543
00544 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00545 Index p, const Range& r, Index c) const;
00546
00547 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00548 Index p, const Range& r, Index c) const;
00549
00550 ConstTensor3View operator()( const Range& v, Index s, Index b,
00551 const Range& p, const Range& r, Index c) const;
00552
00553 ConstTensor3View operator()( Index v, const Range& s, Index b,
00554 const Range& p, const Range& r, Index c) const;
00555
00556 ConstTensor3View operator()( Index v, Index s, const Range& b,
00557 const Range& p, const Range& r, Index c) const;
00558
00559 ConstTensor3View operator()( const Range& v, const Range& s, Index b,
00560 Index p, Index r, const Range& c) const;
00561
00562 ConstTensor3View operator()( const Range& v, Index s, const Range& b,
00563 Index p, Index r, const Range& c) const;
00564
00565 ConstTensor3View operator()( Index v, const Range& s, const Range& b,
00566 Index p, Index r, const Range& c) const;
00567
00568 ConstTensor3View operator()( const Range& v, Index s, Index b,
00569 const Range& p, Index r, const Range& c) const;
00570
00571 ConstTensor3View operator()( Index v, const Range& s, Index b,
00572 const Range& p, Index r, const Range& c) const;
00573
00574 ConstTensor3View operator()( Index v, Index s, const Range& b,
00575 const Range& p, Index r, const Range& c) const;
00576
00577 ConstTensor3View operator()( const Range& v, Index s, Index b,
00578 Index p, const Range& r, const Range& c) const;
00579
00580 ConstTensor3View operator()( Index v, const Range& s, Index b,
00581 Index p, const Range& r, const Range& c) const;
00582
00583 ConstTensor3View operator()( Index v, Index s, const Range& b,
00584 Index p, const Range& r, const Range& c) const;
00585
00586 ConstTensor3View operator()( Index v, Index s, Index b,
00587 const Range& p, const Range& r, const Range& c) const;
00588
00589
00590
00591 ConstMatrixView operator()( Index v, Index s, Index b,
00592 Index p, const Range& r, const Range& c) const;
00593
00594 ConstMatrixView operator()( Index v, Index s, Index b,
00595 const Range& p, Index r, const Range& c) const;
00596
00597 ConstMatrixView operator()( Index v, Index s, const Range& b,
00598 Index p, Index r, const Range& c) const;
00599
00600 ConstMatrixView operator()( Index v, const Range& s, Index b,
00601 Index p, Index r, const Range& c) const;
00602
00603 ConstMatrixView operator()( const Range& v, Index s, Index b,
00604 Index p, Index r, const Range& c) const;
00605
00606 ConstMatrixView operator()( Index v, Index s, Index b,
00607 const Range& p, const Range& r, Index c) const;
00608
00609 ConstMatrixView operator()( Index v, Index s, const Range& b,
00610 Index p, const Range& r, Index c) const;
00611
00612 ConstMatrixView operator()( Index v, const Range& s, Index b,
00613 Index p, const Range& r, Index c) const;
00614
00615 ConstMatrixView operator()( const Range& v, Index s, Index b,
00616 Index p, const Range& r, Index c) const;
00617
00618 ConstMatrixView operator()( Index v, Index s, const Range& b,
00619 const Range& p, Index r, Index c) const;
00620
00621 ConstMatrixView operator()( Index v, const Range& s, Index b,
00622 const Range& p, Index r, Index c) const;
00623
00624 ConstMatrixView operator()( const Range& v, Index s, Index b,
00625 const Range& p, Index r, Index c) const;
00626
00627 ConstMatrixView operator()( Index v, const Range& s, const Range& b,
00628 Index p, Index r, Index c) const;
00629
00630 ConstMatrixView operator()( const Range& v, Index s, const Range& b,
00631 Index p, Index r, Index c) const;
00632
00633 ConstMatrixView operator()( const Range& v, const Range& s, Index b,
00634 Index p, Index r, Index c) const;
00635
00636
00637
00638 ConstVectorView operator()( Index v, Index s, Index b,
00639 Index p, Index r, const Range& c) const;
00640
00641 ConstVectorView operator()( Index v, Index s, Index b,
00642 Index p, const Range& r, Index c) const;
00643
00644 ConstVectorView operator()( Index v, Index s, Index b,
00645 const Range& p, Index r, Index c) const;
00646
00647 ConstVectorView operator()( Index v, Index s, const Range& b,
00648 Index p, Index r, Index c) const;
00649
00650 ConstVectorView operator()( Index v, const Range& s, Index b,
00651 Index p, Index r, Index c) const;
00652
00653 ConstVectorView operator()( const Range& v, Index s, Index b,
00654 Index p, Index r, Index c) const;
00655
00656
00657
00658 Numeric operator() ( Index v, Index s, Index b,
00659 Index p, Index r, Index c) const
00660 { return ConstTensor6View::operator()(v,s,b,p,r,c); }
00661
00662
00663
00664
00665
00666
00667 Tensor6View operator()( const Range& v, const Range& s, const Range& b,
00668 const Range& p, const Range& r, const Range& c);
00669
00670
00671
00672 Tensor5View operator()( const Range& v, const Range& s, const Range& b,
00673 const Range& p, const Range& r, Index c);
00674
00675 Tensor5View operator()( const Range& v, const Range& s, const Range& b,
00676 const Range& p, Index r, const Range& c);
00677
00678 Tensor5View operator()( const Range& v, const Range& s, const Range& b,
00679 Index p, const Range& r, const Range& c);
00680
00681 Tensor5View operator()( const Range& v, const Range& s, Index b,
00682 const Range& p, const Range& r, const Range& c);
00683
00684 Tensor5View operator()( const Range& v, Index s, const Range& b,
00685 const Range& p, const Range& r, const Range& c);
00686
00687 Tensor5View operator()( Index v, const Range& s, const Range& b,
00688 const Range& p, const Range& r, const Range& c);
00689
00690
00691
00692 Tensor4View operator()( const Range& v, const Range& s, const Range& b,
00693 const Range& p, Index r, Index c);
00694
00695 Tensor4View operator()( const Range& v, const Range& s, const Range& b,
00696 Index p, const Range& r, Index c);
00697
00698 Tensor4View operator()( const Range& v, const Range& s, Index b,
00699 const Range& p, const Range& r, Index c);
00700
00701 Tensor4View operator()( const Range& v, Index s, const Range& b,
00702 const Range& p, const Range& r, Index c);
00703
00704 Tensor4View operator()( Index v, const Range& s, const Range& b,
00705 const Range& p, const Range& r, Index c);
00706
00707 Tensor4View operator()( const Range& v, const Range& s, const Range& b,
00708 Index p, Index r, const Range& c);
00709
00710 Tensor4View operator()( const Range& v, const Range& s, Index b,
00711 const Range& p, Index r, const Range& c);
00712
00713 Tensor4View operator()( const Range& v, Index s, const Range& b,
00714 const Range& p, Index r, const Range& c);
00715
00716 Tensor4View operator()( Index v, const Range& s, const Range& b,
00717 const Range& p, Index r, const Range& c);
00718
00719 Tensor4View operator()( const Range& v, const Range& s, Index b,
00720 Index p, const Range& r, const Range& c);
00721
00722 Tensor4View operator()( const Range& v, Index s, const Range& b,
00723 Index p, const Range& r, const Range& c);
00724
00725 Tensor4View operator()( Index v, const Range& s, const Range& b,
00726 Index p, const Range& r, const Range& c);
00727
00728 Tensor4View operator()( const Range& v, Index s, Index b,
00729 const Range& p, const Range& r, const Range& c);
00730
00731 Tensor4View operator()( Index v, const Range& s, Index b,
00732 const Range& p, const Range& r, const Range& c);
00733
00734 Tensor4View operator()( Index v, Index s, const Range& b,
00735 const Range& p, const Range& r, const Range& c);
00736
00737
00738
00739 Tensor3View operator()( const Range& v, const Range& s, const Range& b,
00740 Index p, Index r, Index c);
00741
00742 Tensor3View operator()( const Range& v, const Range& s, Index b,
00743 const Range& p, Index r, Index c);
00744
00745 Tensor3View operator()( const Range& v, Index s, const Range& b,
00746 const Range& p, Index r, Index c);
00747
00748 Tensor3View operator()( Index v, const Range& s, const Range& b,
00749 const Range& p, Index r, Index c);
00750
00751 Tensor3View operator()( const Range& v, const Range& s, Index b,
00752 Index p, const Range& r, Index c);
00753
00754 Tensor3View operator()( const Range& v, Index s, const Range& b,
00755 Index p, const Range& r, Index c);
00756
00757 Tensor3View operator()( Index v, const Range& s, const Range& b,
00758 Index p, const Range& r, Index c);
00759
00760 Tensor3View operator()( const Range& v, Index s, Index b,
00761 const Range& p, const Range& r, Index c);
00762
00763 Tensor3View operator()( Index v, const Range& s, Index b,
00764 const Range& p, const Range& r, Index c);
00765
00766 Tensor3View operator()( Index v, Index s, const Range& b,
00767 const Range& p, const Range& r, Index c);
00768
00769 Tensor3View operator()( const Range& v, const Range& s, Index b,
00770 Index p, Index r, const Range& c);
00771
00772 Tensor3View operator()( const Range& v, Index s, const Range& b,
00773 Index p, Index r, const Range& c);
00774
00775 Tensor3View operator()( Index v, const Range& s, const Range& b,
00776 Index p, Index r, const Range& c);
00777
00778 Tensor3View operator()( const Range& v, Index s, Index b,
00779 const Range& p, Index r, const Range& c);
00780
00781 Tensor3View operator()( Index v, const Range& s, Index b,
00782 const Range& p, Index r, const Range& c);
00783
00784 Tensor3View operator()( Index v, Index s, const Range& b,
00785 const Range& p, Index r, const Range& c);
00786
00787 Tensor3View operator()( const Range& v, Index s, Index b,
00788 Index p, const Range& r, const Range& c);
00789
00790 Tensor3View operator()( Index v, const Range& s, Index b,
00791 Index p, const Range& r, const Range& c);
00792
00793 Tensor3View operator()( Index v, Index s, const Range& b,
00794 Index p, const Range& r, const Range& c);
00795
00796 Tensor3View operator()( Index v, Index s, Index b,
00797 const Range& p, const Range& r, const Range& c);
00798
00799
00800
00801 MatrixView operator()( Index v, Index s, Index b,
00802 Index p, const Range& r, const Range& c);
00803
00804 MatrixView operator()( Index v, Index s, Index b,
00805 const Range& p, Index r, const Range& c);
00806
00807 MatrixView operator()( Index v, Index s, const Range& b,
00808 Index p, Index r, const Range& c);
00809
00810 MatrixView operator()( Index v, const Range& s, Index b,
00811 Index p, Index r, const Range& c);
00812
00813 MatrixView operator()( const Range& v, Index s, Index b,
00814 Index p, Index r, const Range& c);
00815
00816 MatrixView operator()( Index v, Index s, Index b,
00817 const Range& p, const Range& r, Index c);
00818
00819 MatrixView operator()( Index v, Index s, const Range& b,
00820 Index p, const Range& r, Index c);
00821
00822 MatrixView operator()( Index v, const Range& s, Index b,
00823 Index p, const Range& r, Index c);
00824
00825 MatrixView operator()( const Range& v, Index s, Index b,
00826 Index p, const Range& r, Index c);
00827
00828 MatrixView operator()( Index v, Index s, const Range& b,
00829 const Range& p, Index r, Index c);
00830
00831 MatrixView operator()( Index v, const Range& s, Index b,
00832 const Range& p, Index r, Index c);
00833
00834 MatrixView operator()( const Range& v, Index s, Index b,
00835 const Range& p, Index r, Index c);
00836
00837 MatrixView operator()( Index v, const Range& s, const Range& b,
00838 Index p, Index r, Index c);
00839
00840 MatrixView operator()( const Range& v, Index s, const Range& b,
00841 Index p, Index r, Index c);
00842
00843 MatrixView operator()( const Range& v, const Range& s, Index b,
00844 Index p, Index r, Index c);
00845
00846
00847
00848 VectorView operator()( Index v, Index s, Index b,
00849 Index p, Index r, const Range& c);
00850
00851 VectorView operator()( Index v, Index s, Index b,
00852 Index p, const Range& r, Index c);
00853
00854 VectorView operator()( Index v, Index s, Index b,
00855 const Range& p, Index r, Index c);
00856
00857 VectorView operator()( Index v, Index s, const Range& b,
00858 Index p, Index r, Index c);
00859
00860 VectorView operator()( Index v, const Range& s, Index b,
00861 Index p, Index r, Index c);
00862
00863 VectorView operator()( const Range& v, Index s, Index b,
00864 Index p, Index r, Index c);
00865
00866
00867
00868 Numeric& operator() ( Index v, Index s, Index b,
00869 Index p, Index r, Index c)
00870 { CHECK(s);
00871 CHECK(b);
00872 CHECK(p);
00873 CHECK(r);
00874 CHECK(c);
00875 return *(mdata +
00876 OFFSET(v) + OFFSET(s) + OFFSET(b) +
00877 OFFSET(p) + OFFSET(r) + OFFSET(c) );
00878 }
00879
00880
00881
00882 ConstIterator6D begin() const;
00883 ConstIterator6D end() const;
00884
00885 Iterator6D begin();
00886 Iterator6D end();
00887
00888
00889 Tensor6View& operator=(const ConstTensor6View& v);
00890 Tensor6View& operator=(const Tensor6View& v);
00891 Tensor6View& operator=(const Tensor6& v);
00892 Tensor6View& operator=(Numeric x);
00893
00894
00895 Tensor6View& operator*=(Numeric x);
00896 Tensor6View& operator/=(Numeric x);
00897 Tensor6View& operator+=(Numeric x);
00898 Tensor6View& operator-=(Numeric x);
00899
00900 Tensor6View& operator*=(const ConstTensor6View& x);
00901 Tensor6View& operator/=(const ConstTensor6View& x);
00902 Tensor6View& operator+=(const ConstTensor6View& x);
00903 Tensor6View& operator-=(const ConstTensor6View& x);
00904
00905
00906 virtual ~Tensor6View() {};
00907
00908
00909 friend class Iterator7D;
00910 friend class Tensor7View;
00911
00912
00913 Tensor6View(const Tensor5View& a);
00914
00915 protected:
00916
00917 Tensor6View();
00918 Tensor6View(Numeric *data,
00919 const Range& v, const Range& s, const Range& b,
00920 const Range& p, const Range& r, const Range& c);
00921 Tensor6View(Numeric *data,
00922 const Range& pv, const Range& ps, const Range& pb,
00923 const Range& pp, const Range& pr, const Range& pc,
00924 const Range& nv, const Range& ns, const Range& nb,
00925 const Range& np, const Range& nr, const Range& nc);
00926 };
00927
00936 class Tensor6 : public Tensor6View {
00937 public:
00938
00939 Tensor6();
00940 Tensor6(Index v, Index s, Index b,
00941 Index p, Index r, Index c);
00942 Tensor6(Index v, Index s, Index b,
00943 Index p, Index r, Index c,
00944 Numeric fill);
00945 Tensor6(const ConstTensor6View& v);
00946 Tensor6(const Tensor6& v);
00947
00948
00949 Tensor6& operator=(const Tensor6& x);
00950 Tensor6& operator=(Numeric x);
00951
00952
00953 void resize(Index v, Index s, Index b,
00954 Index p, Index r, Index c);
00955
00956
00957 virtual ~Tensor6();
00958 };
00959
00960
00961
00962
00963
00964 void copy(ConstIterator6D origin,
00965 const ConstIterator6D& end,
00966 Iterator6D target);
00967
00968 void copy(Numeric x,
00969 Iterator6D target,
00970 const Iterator6D& end);
00971
00972 void transform( Tensor6View y,
00973 double (&my_func)(double),
00974 ConstTensor6View x );
00975
00976 Numeric max(const ConstTensor6View& x);
00977
00978 Numeric min(const ConstTensor6View& x);
00979
00980 ostream& operator<<(ostream& os, const ConstTensor6View& v);
00981
00983
00984 #ifndef NDEBUG
00985
00986 Numeric debug_tensor6view_get_elem (Tensor6View& tv, Index v, Index s, Index b,
00987 Index p, Index r, Index c);
00988
00989 #endif
00991
00992 #endif // matpackVI_h