ARTS  2.2.66
matpackVII.h
Go to the documentation of this file.
1 
2 /* Copyright (C) 2001-2012 Stefan Buehler <sbuehler@ltu.se>
3 
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
7 later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18 
29 #ifndef matpackVII_h
30 #define matpackVII_h
31 
32 #include "matpackVI.h"
33 
36 class Iterator7D {
37 public:
38  // Constructors:
40  Iterator7D() : msv(), mstride(0) { /* Nothing to do here. */ }
41 
43  Iterator7D(const Tensor6View& x, Index stride) : msv(x), mstride(stride)
44  { /* Nothing to do here. */ }
45 
46  // Operators:
48  Iterator7D& operator++() { msv.mdata += mstride; return *this; }
49 
54  bool operator!=(const Iterator7D& other) const
55  { if ( msv.mdata +
56  msv.mvr.mstart +
57  msv.msr.mstart +
58  msv.mbr.mstart +
59  msv.mpr.mstart +
60  msv.mrr.mstart +
61  msv.mcr.mstart
62  !=
63  other.msv.mdata +
64  other.msv.mvr.mstart +
65  other.msv.msr.mstart +
66  other.msv.mbr.mstart +
67  other.msv.mpr.mstart +
68  other.msv.mrr.mstart +
69  other.msv.mcr.mstart )
70  return true;
71  else
72  return false;
73  }
74 
77  Tensor6View* operator->() { return &msv; }
78 
80  Tensor6View& operator*() { return msv; }
81 
82 private:
87 };
88 
91 public:
92  // Constructors:
94  ConstIterator7D() : msv(), mstride(0) { /* Nothing to do here. */ }
95 
98  : msv(x), mstride(stride)
99  { /* Nothing to do here. */ }
100 
101  // Operators:
103  ConstIterator7D& operator++() { msv.mdata += mstride; return *this; }
104 
109  bool operator!=(const ConstIterator7D& other) const
110  { if ( msv.mdata +
111  msv.mvr.mstart +
112  msv.msr.mstart +
113  msv.mbr.mstart +
114  msv.mpr.mstart +
115  msv.mrr.mstart +
116  msv.mcr.mstart
117  !=
118  other.msv.mdata +
119  other.msv.mvr.mstart +
120  other.msv.msr.mstart +
121  other.msv.mbr.mstart +
122  other.msv.mpr.mstart +
123  other.msv.mrr.mstart +
124  other.msv.mcr.mstart )
125  return true;
126  else
127  return false;
128  }
129 
132  const ConstTensor6View* operator->() const { return &msv; }
133 
135  const ConstTensor6View& operator*() const { return msv; }
136 
137 private:
142 };
143 
144 
145 // Declare class Tensor7:
146 class Tensor7;
147 
148 
163 public:
164  // Member functions:
165  Index nlibraries() const;
166  Index nvitrines() const;
167  Index nshelves() const;
168  Index nbooks() const;
169  Index npages() const;
170  Index nrows() const;
171  Index ncols() const;
172 
173  // Const index operators:
174 
175  // Result 7D (1 combination)
176  // -------
178  const Range& v, const Range& s, const Range& b,
179  const Range& p, const Range& r, const Range& c) const;
180 
181  // Result 6D (7 combinations)
182  // ------|
184  const Range& v, const Range& s, const Range& b,
185  const Range& p, const Range& r, Index c) const;
186  // -----|-
188  const Range& v, const Range& s, const Range& b,
189  const Range& p, Index r, const Range& c) const;
190  // ----|--
192  const Range& v, const Range& s, const Range& b,
193  Index p, const Range& r, const Range& c) const;
194  // ---|---
196  const Range& v, const Range& s, Index b,
197  const Range& p, const Range& r, const Range& c) const;
198  // --|----
200  const Range& v, Index s, const Range& b,
201  const Range& p, const Range& r, const Range& c) const;
202  // -|-----
204  Index v, const Range& s, const Range& b,
205  const Range& p, const Range& r, const Range& c) const;
206  // |------
208  const Range& v, const Range& s, const Range& b,
209  const Range& p, const Range& r, const Range& c) const;
210 
211  // Result 5D (6+5+4+3+2+1 = 21 combinations)
212  // -----||
214  const Range& v, const Range& s, const Range& b,
215  const Range& p, Index r, Index c) const;
216  // ----|-|
218  const Range& v, const Range& s, const Range& b,
219  Index p, const Range& r, Index c) const;
220  // ---|--|
222  const Range& v, const Range& s, Index b,
223  const Range& p, const Range& r, Index c) const;
224  // --|---|
226  const Range& v, Index s, const Range& b,
227  const Range& p, const Range& r, Index c) const;
228  // -|----|
230  Index v, const Range& s, const Range& b,
231  const Range& p, const Range& r, Index c) const;
232  // |-----|
234  const Range& v, const Range& s, const Range& b,
235  const Range& p, const Range& r, Index c) const;
236  // ----||-
238  const Range& v, const Range& s, const Range& b,
239  Index p, Index r, const Range& c) const;
240  // ---|-|-
242  const Range& v, const Range& s, Index b,
243  const Range& p, Index r, const Range& c) const;
244  // --|--|-
246  const Range& v, Index s, const Range& b,
247  const Range& p, Index r, const Range& c) const;
248  // -|---|-
250  Index v, const Range& s, const Range& b,
251  const Range& p, Index r, const Range& c) const;
252  // |----|-
254  const Range& v, const Range& s, const Range& b,
255  const Range& p, Index r, const Range& c) const;
256  // ---||--
258  const Range& v, const Range& s, Index b,
259  Index p, const Range& r, const Range& c) const;
260  // --|-|--
262  const Range& v, Index s, const Range& b,
263  Index p, const Range& r, const Range& c) const;
264  // -|--|--
266  Index v, const Range& s, const Range& b,
267  Index p, const Range& r, const Range& c) const;
268  // |---|--
270  const Range& v, const Range& s, const Range& b,
271  Index p, const Range& r, const Range& c) const;
272  // --||---
274  const Range& v, Index s, Index b,
275  const Range& p, const Range& r, const Range& c) const;
276  // -|-|---
278  Index v, const Range& s, Index b,
279  const Range& p, const Range& r, const Range& c) const;
280  // |--|---
282  const Range& v, const Range& s, Index b,
283  const Range& p, const Range& r, const Range& c) const;
284  // -||----
286  Index v, Index s, const Range& b,
287  const Range& p, const Range& r, const Range& c) const;
288  // |-|----
290  const Range& v, Index s, const Range& b,
291  const Range& p, const Range& r, const Range& c) const;
292  // ||-----
294  Index v, const Range& s, const Range& b,
295  const Range& p, const Range& r, const Range& c) const;
296 
297  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
298  // ----|||
300  const Range& v, const Range& s, const Range& b,
301  Index p, Index r, Index c) const;
302  // ---|-||
304  const Range& v, const Range& s, Index b,
305  const Range& p, Index r, Index c) const;
306  // --|--||
308  const Range& v, Index s, const Range& b,
309  const Range& p, Index r, Index c) const;
310  // -|---||
312  Index v, const Range& s, const Range& b,
313  const Range& p, Index r, Index c) const;
314  // |----||
316  const Range& v, const Range& s, const Range& b,
317  const Range& p, Index r, Index c) const;
318  // ---||-|
320  const Range& v, const Range& s, Index b,
321  Index p, const Range& r, Index c) const;
322  // --|-|-|
324  const Range& v, Index s, const Range& b,
325  Index p, const Range& r, Index c) const;
326  // -|--|-|
328  Index v, const Range& s, const Range& b,
329  Index p, const Range& r, Index c) const;
330  // |---|-|
332  const Range& v, const Range& s, const Range& b,
333  Index p, const Range& r, Index c) const;
334  // --||--|
336  const Range& v, Index s, Index b,
337  const Range& p, const Range& r, Index c) const;
338  // -|-|--|
340  Index v, const Range& s, Index b,
341  const Range& p, const Range& r, Index c) const;
342  // |--|--|
344  const Range& v, const Range& s, Index b,
345  const Range& p, const Range& r, Index c) const;
346  // -||---|
348  Index v, Index s, const Range& b,
349  const Range& p, const Range& r, Index c) const;
350  // |-|---|
352  const Range& v, Index s, const Range& b,
353  const Range& p, const Range& r, Index c) const;
354  // ||----|
356  Index v, const Range& s, const Range& b,
357  const Range& p, const Range& r, Index c) const;
358  // ---|||-
360  const Range& v, const Range& s, Index b,
361  Index p, Index r, const Range& c) const;
362  // --|-||-
364  const Range& v, Index s, const Range& b,
365  Index p, Index r, const Range& c) const;
366  // -|--||-
368  Index v, const Range& s, const Range& b,
369  Index p, Index r, const Range& c) const;
370  // |---||-
372  const Range& v, const Range& s, const Range& b,
373  Index p, Index r, const Range& c) const;
374  // --||-|-
376  const Range& v, Index s, Index b,
377  const Range& p, Index r, const Range& c) const;
378  // -|-|-|-
380  Index v, const Range& s, Index b,
381  const Range& p, Index r, const Range& c) const;
382  // |--|-|-
384  const Range& v, const Range& s, Index b,
385  const Range& p, Index r, const Range& c) const;
386  // -||--|-
388  Index v, Index s, const Range& b,
389  const Range& p, Index r, const Range& c) const;
390  // |-|--|-
392  const Range& v, Index s, const Range& b,
393  const Range& p, Index r, const Range& c) const;
394  // ||---|-
396  Index v, const Range& s, const Range& b,
397  const Range& p, Index r, const Range& c) const;
398  // --|||--
400  const Range& v, Index s, Index b,
401  Index p, const Range& r, const Range& c) const;
402  // -|-||--
404  Index v, const Range& s, Index b,
405  Index p, const Range& r, const Range& c) const;
406  // |--||--
408  const Range& v, const Range& s, Index b,
409  Index p, const Range& r, const Range& c) const;
410  // -||-|--
412  Index v, Index s, const Range& b,
413  Index p, const Range& r, const Range& c) const;
414  // |-|-|--
416  const Range& v, Index s, const Range& b,
417  Index p, const Range& r, const Range& c) const;
418  // ||--|--
420  Index v, const Range& s, const Range& b,
421  Index p, const Range& r, const Range& c) const;
422  // -|||---
424  Index v, Index s, Index b,
425  const Range& p, const Range& r, const Range& c) const;
426  // |-||---
428  const Range& v, Index s, Index b,
429  const Range& p, const Range& r, const Range& c) const;
430  // ||-|---
432  Index v, const Range& s, Index b,
433  const Range& p, const Range& r, const Range& c) const;
434  // |||----
436  Index v, Index s, const Range& b,
437  const Range& p, const Range& r, const Range& c) const;
438 
439  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
440  // ||||---
442  Index v, Index s, Index b,
443  const Range& p, const Range& r, const Range& c) const;
444  // |||-|--
446  Index v, Index s, const Range& b,
447  Index p, const Range& r, const Range& c) const;
448  // ||-||--
450  Index v, const Range& s, Index b,
451  Index p, const Range& r, const Range& c) const;
452  // |-|||--
454  const Range& v, Index s, Index b,
455  Index p, const Range& r, const Range& c) const;
456  // -||||--
458  Index v, Index s, Index b,
459  Index p, const Range& r, const Range& c) const;
460  // |||--|-
462  Index v, Index s, const Range& b,
463  const Range& p, Index r, const Range& c) const;
464  // ||-|-|-
466  Index v, const Range& s, Index b,
467  const Range& p, Index r, const Range& c) const;
468  // |-||-|-
470  const Range& v, Index s, Index b,
471  const Range& p, Index r, const Range& c) const;
472  // -|||-|-
474  Index v, Index s, Index b,
475  const Range& p, Index r, const Range& c) const;
476  // ||--||-
478  Index v, const Range& s, const Range& b,
479  Index p, Index r, const Range& c) const;
480  // |-|-||-
482  const Range& v, Index s, const Range& b,
483  Index p, Index r, const Range& c) const;
484  // -||-||-
486  Index v, Index s, const Range& b,
487  Index p, Index r, const Range& c) const;
488  // |--|||-
490  const Range& v, const Range& s, Index b,
491  Index p, Index r, const Range& c) const;
492  // -|-|||-
494  Index v, const Range& s, Index b,
495  Index p, Index r, const Range& c) const;
496  // --||||-
498  const Range& v, Index s, Index b,
499  Index p, Index r, const Range& c) const;
500  // |||---|
502  Index v, Index s, const Range& b,
503  const Range& p, const Range& r, Index c) const;
504  // ||-|--|
506  Index v, const Range& s, Index b,
507  const Range& p, const Range& r, Index c) const;
508  // |-||--|
510  const Range& v, Index s, Index b,
511  const Range& p, const Range& r, Index c) const;
512  // -|||--|
514  Index v, Index s, Index b,
515  const Range& p, const Range& r, Index c) const;
516  // ||--|-|
518  Index v, const Range& s, const Range& b,
519  Index p, const Range& r, Index c) const;
520  // |-|-|-|
522  const Range& v, Index s, const Range& b,
523  Index p, const Range& r, Index c) const;
524  // -||-|-|
526  Index v, Index s, const Range& b,
527  Index p, const Range& r, Index c) const;
528  // |--||-|
530  const Range& v, const Range& s, Index b,
531  Index p, const Range& r, Index c) const;
532  // -|-||-|
534  Index v, const Range& s, Index b,
535  Index p, const Range& r, Index c) const;
536  // --|||-|
538  const Range& v, Index s, Index b,
539  Index p, const Range& r, Index c) const;
540  // ||---||
542  Index v, const Range& s, const Range& b,
543  const Range& p, Index r, Index c) const;
544  // |-|--||
546  const Range& v, Index s, const Range& b,
547  const Range& p, Index r, Index c) const;
548  // -||--||
550  Index v, Index s, const Range& b,
551  const Range& p, Index r, Index c) const;
552  // |--|-||
554  const Range& v, const Range& s, Index b,
555  const Range& p, Index r, Index c) const;
556  // -|-|-||
558  Index v, const Range& s, Index b,
559  const Range& p, Index r, Index c) const;
560  // --||-||
562  const Range& v, Index s, Index b,
563  const Range& p, Index r, Index c) const;
564  // |---|||
566  const Range& v, const Range& s, const Range& b,
567  Index p, Index r, Index c) const;
568  // -|--|||
570  Index v, const Range& s, const Range& b,
571  Index p, Index r, Index c) const;
572  // --|-|||
574  const Range& v, Index s, const Range& b,
575  Index p, Index r, Index c) const;
576  // ---||||
578  const Range& v, const Range& s, Index b,
579  Index p, Index r, Index c) const;
580 
581  // Result 2D (6+5+4+3+2+1 = 21 combinations)
582  // |||||--
584  Index v, Index s, Index b,
585  Index p, const Range& r, const Range& c) const;
586  // ||||-|-
588  Index v, Index s, Index b,
589  const Range& p, Index r, const Range& c) const;
590  // |||-||-
592  Index v, Index s, const Range& b,
593  Index p, Index r, const Range& c) const;
594  // ||-|||-
596  Index v, const Range& s, Index b,
597  Index p, Index r, const Range& c) const;
598  // |-||||-
600  const Range& v, Index s, Index b,
601  Index p, Index r, const Range& c) const;
602  // -|||||-
603  ConstMatrixView operator()( const Range& l,
604  Index v, Index s, Index b,
605  Index p, Index r, const Range& c) const;
606  // ||||--|
608  Index v, Index s, Index b,
609  const Range& p, const Range& r, Index c) const;
610  // |||-|-|
612  Index v, Index s, const Range& b,
613  Index p, const Range& r, Index c) const;
614  // ||-||-|
616  Index v, const Range& s, Index b,
617  Index p, const Range& r, Index c) const;
618  // |-|||-|
620  const Range& v, Index s, Index b,
621  Index p, const Range& r, Index c) const;
622  // -||||-|
623  ConstMatrixView operator()( const Range& l,
624  Index v, Index s, Index b,
625  Index p, const Range& r, Index c) const;
626  // |||--||
628  Index v, Index s, const Range& b,
629  const Range& p, Index r, Index c) const;
630  // ||-|-||
632  Index v, const Range& s, Index b,
633  const Range& p, Index r, Index c) const;
634  // |-||-||
636  const Range& v, Index s, Index b,
637  const Range& p, Index r, Index c) const;
638  // -|||-||
639  ConstMatrixView operator()( const Range& l,
640  Index v, Index s, Index b,
641  const Range& p, Index r, Index c) const;
642  // ||--|||
644  Index v, const Range& s, const Range& b,
645  Index p, Index r, Index c) const;
646  // |-|-|||
648  const Range& v, Index s, const Range& b,
649  Index p, Index r, Index c) const;
650  // -||-|||
651  ConstMatrixView operator()( const Range& l,
652  Index v, Index s, const Range& b,
653  Index p, Index r, Index c) const;
654  // |--||||
656  const Range& v, const Range& s, Index b,
657  Index p, Index r, Index c) const;
658  // -|-||||
659  ConstMatrixView operator()( const Range& l,
660  Index v, const Range& s, Index b,
661  Index p, Index r, Index c) const;
662  // --|||||
663  ConstMatrixView operator()( const Range& l,
664  const Range& v, Index s, Index b,
665  Index p, Index r, Index c) const;
666 
667  // Result 1D (7 combinations)
668  // ||||||-
670  Index v, Index s, Index b,
671  Index p, Index r, const Range& c) const;
672  // |||||-|
674  Index v, Index s, Index b,
675  Index p, const Range& r, Index c) const;
676  // ||||-||
678  Index v, Index s, Index b,
679  const Range& p, Index r, Index c) const;
680  // |||-|||
682  Index v, Index s, const Range& b,
683  Index p, Index r, Index c) const;
684  // ||-||||
686  Index v, const Range& s, Index b,
687  Index p, Index r, Index c) const;
688  // |-|||||
690  const Range& v, Index s, Index b,
691  Index p, Index r, Index c) const;
692  // -||||||
693  ConstVectorView operator()( const Range& l,
694  Index v, Index s, Index b,
695  Index p, Index r, Index c) const;
696 
697  // Result scalar (1 combination)
698  // |||||||
700  Index v, Index s, Index b,
701  Index p, Index r, Index c) const
702  { CHECK(l);
703  CHECK(v);
704  CHECK(s);
705  CHECK(b);
706  CHECK(p);
707  CHECK(r);
708  CHECK(c);
709  return get(l, v, s, b, p, r, c);
710  }
711 
714  Index v, Index s, Index b,
715  Index p, Index r, Index c) const
716  {
717  return *(mdata + OFFSET(l) +
718  OFFSET(v) + OFFSET(s) + OFFSET(b) +
719  OFFSET(p) + OFFSET(r) + OFFSET(c) );
720  }
721 
722 
723  // Functions returning iterators:
724  ConstIterator7D begin() const;
725  ConstIterator7D end() const;
726 
728  virtual ~ConstTensor7View() {}
729 
730  // Friends:
731  friend class Tensor7View;
732 
733  // Special constructor to make a Tensor7 view of a Tensor6.
735 
736 protected:
737  // Constructors:
740  const Range& l,
741  const Range& v, const Range& s, const Range& b,
742  const Range& p, const Range& r, const Range& c);
744  const Range& pl,
745  const Range& pv, const Range& ps, const Range& pb,
746  const Range& pp, const Range& pr, const Range& pc,
747  const Range& nl,
748  const Range& nv, const Range& ns, const Range& nb,
749  const Range& np, const Range& nr, const Range& nc);
750 
751  // Data members:
752  // -------------
769 };
770 
781 public:
782 
783  // Const index operators:
784 
785  // Result 7D (1 combination)
786  // -------
788  const Range& v, const Range& s, const Range& b,
789  const Range& p, const Range& r, const Range& c) const;
790 
791  // Result 6D (7 combinations)
792  // ------|
794  const Range& v, const Range& s, const Range& b,
795  const Range& p, const Range& r, Index c) const;
796  // -----|-
798  const Range& v, const Range& s, const Range& b,
799  const Range& p, Index r, const Range& c) const;
800  // ----|--
802  const Range& v, const Range& s, const Range& b,
803  Index p, const Range& r, const Range& c) const;
804  // ---|---
806  const Range& v, const Range& s, Index b,
807  const Range& p, const Range& r, const Range& c) const;
808  // --|----
810  const Range& v, Index s, const Range& b,
811  const Range& p, const Range& r, const Range& c) const;
812  // -|-----
814  Index v, const Range& s, const Range& b,
815  const Range& p, const Range& r, const Range& c) const;
816  // |------
818  const Range& v, const Range& s, const Range& b,
819  const Range& p, const Range& r, const Range& c) const;
820 
821  // Result 5D (6+5+4+3+2+1 = 21 combinations)
822  // -----||
824  const Range& v, const Range& s, const Range& b,
825  const Range& p, Index r, Index c) const;
826  // ----|-|
828  const Range& v, const Range& s, const Range& b,
829  Index p, const Range& r, Index c) const;
830  // ---|--|
832  const Range& v, const Range& s, Index b,
833  const Range& p, const Range& r, Index c) const;
834  // --|---|
836  const Range& v, Index s, const Range& b,
837  const Range& p, const Range& r, Index c) const;
838  // -|----|
840  Index v, const Range& s, const Range& b,
841  const Range& p, const Range& r, Index c) const;
842  // |-----|
844  const Range& v, const Range& s, const Range& b,
845  const Range& p, const Range& r, Index c) const;
846  // ----||-
848  const Range& v, const Range& s, const Range& b,
849  Index p, Index r, const Range& c) const;
850  // ---|-|-
852  const Range& v, const Range& s, Index b,
853  const Range& p, Index r, const Range& c) const;
854  // --|--|-
856  const Range& v, Index s, const Range& b,
857  const Range& p, Index r, const Range& c) const;
858  // -|---|-
860  Index v, const Range& s, const Range& b,
861  const Range& p, Index r, const Range& c) const;
862  // |----|-
864  const Range& v, const Range& s, const Range& b,
865  const Range& p, Index r, const Range& c) const;
866  // ---||--
868  const Range& v, const Range& s, Index b,
869  Index p, const Range& r, const Range& c) const;
870  // --|-|--
872  const Range& v, Index s, const Range& b,
873  Index p, const Range& r, const Range& c) const;
874  // -|--|--
876  Index v, const Range& s, const Range& b,
877  Index p, const Range& r, const Range& c) const;
878  // |---|--
880  const Range& v, const Range& s, const Range& b,
881  Index p, const Range& r, const Range& c) const;
882  // --||---
884  const Range& v, Index s, Index b,
885  const Range& p, const Range& r, const Range& c) const;
886  // -|-|---
888  Index v, const Range& s, Index b,
889  const Range& p, const Range& r, const Range& c) const;
890  // |--|---
892  const Range& v, const Range& s, Index b,
893  const Range& p, const Range& r, const Range& c) const;
894  // -||----
896  Index v, Index s, const Range& b,
897  const Range& p, const Range& r, const Range& c) const;
898  // |-|----
900  const Range& v, Index s, const Range& b,
901  const Range& p, const Range& r, const Range& c) const;
902  // ||-----
904  Index v, const Range& s, const Range& b,
905  const Range& p, const Range& r, const Range& c) const;
906 
907  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
908  // ----|||
910  const Range& v, const Range& s, const Range& b,
911  Index p, Index r, Index c) const;
912  // ---|-||
914  const Range& v, const Range& s, Index b,
915  const Range& p, Index r, Index c) const;
916  // --|--||
918  const Range& v, Index s, const Range& b,
919  const Range& p, Index r, Index c) const;
920  // -|---||
922  Index v, const Range& s, const Range& b,
923  const Range& p, Index r, Index c) const;
924  // |----||
926  const Range& v, const Range& s, const Range& b,
927  const Range& p, Index r, Index c) const;
928  // ---||-|
930  const Range& v, const Range& s, Index b,
931  Index p, const Range& r, Index c) const;
932  // --|-|-|
934  const Range& v, Index s, const Range& b,
935  Index p, const Range& r, Index c) const;
936  // -|--|-|
938  Index v, const Range& s, const Range& b,
939  Index p, const Range& r, Index c) const;
940  // |---|-|
942  const Range& v, const Range& s, const Range& b,
943  Index p, const Range& r, Index c) const;
944  // --||--|
946  const Range& v, Index s, Index b,
947  const Range& p, const Range& r, Index c) const;
948  // -|-|--|
950  Index v, const Range& s, Index b,
951  const Range& p, const Range& r, Index c) const;
952  // |--|--|
954  const Range& v, const Range& s, Index b,
955  const Range& p, const Range& r, Index c) const;
956  // -||---|
958  Index v, Index s, const Range& b,
959  const Range& p, const Range& r, Index c) const;
960  // |-|---|
962  const Range& v, Index s, const Range& b,
963  const Range& p, const Range& r, Index c) const;
964  // ||----|
966  Index v, const Range& s, const Range& b,
967  const Range& p, const Range& r, Index c) const;
968  // ---|||-
970  const Range& v, const Range& s, Index b,
971  Index p, Index r, const Range& c) const;
972  // --|-||-
974  const Range& v, Index s, const Range& b,
975  Index p, Index r, const Range& c) const;
976  // -|--||-
978  Index v, const Range& s, const Range& b,
979  Index p, Index r, const Range& c) const;
980  // |---||-
982  const Range& v, const Range& s, const Range& b,
983  Index p, Index r, const Range& c) const;
984  // --||-|-
986  const Range& v, Index s, Index b,
987  const Range& p, Index r, const Range& c) const;
988  // -|-|-|-
990  Index v, const Range& s, Index b,
991  const Range& p, Index r, const Range& c) const;
992  // |--|-|-
994  const Range& v, const Range& s, Index b,
995  const Range& p, Index r, const Range& c) const;
996  // -||--|-
998  Index v, Index s, const Range& b,
999  const Range& p, Index r, const Range& c) const;
1000  // |-|--|-
1002  const Range& v, Index s, const Range& b,
1003  const Range& p, Index r, const Range& c) const;
1004  // ||---|-
1006  Index v, const Range& s, const Range& b,
1007  const Range& p, Index r, const Range& c) const;
1008  // --|||--
1009  ConstTensor4View operator()( const Range& l,
1010  const Range& v, Index s, Index b,
1011  Index p, const Range& r, const Range& c) const;
1012  // -|-||--
1013  ConstTensor4View operator()( const Range& l,
1014  Index v, const Range& s, Index b,
1015  Index p, const Range& r, const Range& c) const;
1016  // |--||--
1018  const Range& v, const Range& s, Index b,
1019  Index p, const Range& r, const Range& c) const;
1020  // -||-|--
1021  ConstTensor4View operator()( const Range& l,
1022  Index v, Index s, const Range& b,
1023  Index p, const Range& r, const Range& c) const;
1024  // |-|-|--
1026  const Range& v, Index s, const Range& b,
1027  Index p, const Range& r, const Range& c) const;
1028  // ||--|--
1030  Index v, const Range& s, const Range& b,
1031  Index p, const Range& r, const Range& c) const;
1032  // -|||---
1033  ConstTensor4View operator()( const Range& l,
1034  Index v, Index s, Index b,
1035  const Range& p, const Range& r, const Range& c) const;
1036  // |-||---
1038  const Range& v, Index s, Index b,
1039  const Range& p, const Range& r, const Range& c) const;
1040  // ||-|---
1042  Index v, const Range& s, Index b,
1043  const Range& p, const Range& r, const Range& c) const;
1044  // |||----
1046  Index v, Index s, const Range& b,
1047  const Range& p, const Range& r, const Range& c) const;
1048 
1049  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1050  // ||||---
1052  Index v, Index s, Index b,
1053  const Range& p, const Range& r, const Range& c) const;
1054  // |||-|--
1056  Index v, Index s, const Range& b,
1057  Index p, const Range& r, const Range& c) const;
1058  // ||-||--
1060  Index v, const Range& s, Index b,
1061  Index p, const Range& r, const Range& c) const;
1062  // |-|||--
1064  const Range& v, Index s, Index b,
1065  Index p, const Range& r, const Range& c) const;
1066  // -||||--
1067  ConstTensor3View operator()( const Range& l,
1068  Index v, Index s, Index b,
1069  Index p, const Range& r, const Range& c) const;
1070  // |||--|-
1072  Index v, Index s, const Range& b,
1073  const Range& p, Index r, const Range& c) const;
1074  // ||-|-|-
1076  Index v, const Range& s, Index b,
1077  const Range& p, Index r, const Range& c) const;
1078  // |-||-|-
1080  const Range& v, Index s, Index b,
1081  const Range& p, Index r, const Range& c) const;
1082  // -|||-|-
1083  ConstTensor3View operator()( const Range& l,
1084  Index v, Index s, Index b,
1085  const Range& p, Index r, const Range& c) const;
1086  // ||--||-
1088  Index v, const Range& s, const Range& b,
1089  Index p, Index r, const Range& c) const;
1090  // |-|-||-
1092  const Range& v, Index s, const Range& b,
1093  Index p, Index r, const Range& c) const;
1094  // -||-||-
1095  ConstTensor3View operator()( const Range& l,
1096  Index v, Index s, const Range& b,
1097  Index p, Index r, const Range& c) const;
1098  // |--|||-
1100  const Range& v, const Range& s, Index b,
1101  Index p, Index r, const Range& c) const;
1102  // -|-|||-
1103  ConstTensor3View operator()( const Range& l,
1104  Index v, const Range& s, Index b,
1105  Index p, Index r, const Range& c) const;
1106  // --||||-
1107  ConstTensor3View operator()( const Range& l,
1108  const Range& v, Index s, Index b,
1109  Index p, Index r, const Range& c) const;
1110  // |||---|
1112  Index v, Index s, const Range& b,
1113  const Range& p, const Range& r, Index c) const;
1114  // ||-|--|
1116  Index v, const Range& s, Index b,
1117  const Range& p, const Range& r, Index c) const;
1118  // |-||--|
1120  const Range& v, Index s, Index b,
1121  const Range& p, const Range& r, Index c) const;
1122  // -|||--|
1123  ConstTensor3View operator()( const Range& l,
1124  Index v, Index s, Index b,
1125  const Range& p, const Range& r, Index c) const;
1126  // ||--|-|
1128  Index v, const Range& s, const Range& b,
1129  Index p, const Range& r, Index c) const;
1130  // |-|-|-|
1132  const Range& v, Index s, const Range& b,
1133  Index p, const Range& r, Index c) const;
1134  // -||-|-|
1135  ConstTensor3View operator()( const Range& l,
1136  Index v, Index s, const Range& b,
1137  Index p, const Range& r, Index c) const;
1138  // |--||-|
1140  const Range& v, const Range& s, Index b,
1141  Index p, const Range& r, Index c) const;
1142  // -|-||-|
1143  ConstTensor3View operator()( const Range& l,
1144  Index v, const Range& s, Index b,
1145  Index p, const Range& r, Index c) const;
1146  // --|||-|
1147  ConstTensor3View operator()( const Range& l,
1148  const Range& v, Index s, Index b,
1149  Index p, const Range& r, Index c) const;
1150  // ||---||
1152  Index v, const Range& s, const Range& b,
1153  const Range& p, Index r, Index c) const;
1154  // |-|--||
1156  const Range& v, Index s, const Range& b,
1157  const Range& p, Index r, Index c) const;
1158  // -||--||
1159  ConstTensor3View operator()( const Range& l,
1160  Index v, Index s, const Range& b,
1161  const Range& p, Index r, Index c) const;
1162  // |--|-||
1164  const Range& v, const Range& s, Index b,
1165  const Range& p, Index r, Index c) const;
1166  // -|-|-||
1167  ConstTensor3View operator()( const Range& l,
1168  Index v, const Range& s, Index b,
1169  const Range& p, Index r, Index c) const;
1170  // --||-||
1171  ConstTensor3View operator()( const Range& l,
1172  const Range& v, Index s, Index b,
1173  const Range& p, Index r, Index c) const;
1174  // |---|||
1176  const Range& v, const Range& s, const Range& b,
1177  Index p, Index r, Index c) const;
1178  // -|--|||
1179  ConstTensor3View operator()( const Range& l,
1180  Index v, const Range& s, const Range& b,
1181  Index p, Index r, Index c) const;
1182  // --|-|||
1183  ConstTensor3View operator()( const Range& l,
1184  const Range& v, Index s, const Range& b,
1185  Index p, Index r, Index c) const;
1186  // ---||||
1187  ConstTensor3View operator()( const Range& l,
1188  const Range& v, const Range& s, Index b,
1189  Index p, Index r, Index c) const;
1190 
1191  // Result 2D (6+5+4+3+2+1 = 21 combinations)
1192  // |||||--
1194  Index v, Index s, Index b,
1195  Index p, const Range& r, const Range& c) const;
1196  // ||||-|-
1198  Index v, Index s, Index b,
1199  const Range& p, Index r, const Range& c) const;
1200  // |||-||-
1202  Index v, Index s, const Range& b,
1203  Index p, Index r, const Range& c) const;
1204  // ||-|||-
1206  Index v, const Range& s, Index b,
1207  Index p, Index r, const Range& c) const;
1208  // |-||||-
1210  const Range& v, Index s, Index b,
1211  Index p, Index r, const Range& c) const;
1212  // -|||||-
1213  ConstMatrixView operator()( const Range& l,
1214  Index v, Index s, Index b,
1215  Index p, Index r, const Range& c) const;
1216  // ||||--|
1218  Index v, Index s, Index b,
1219  const Range& p, const Range& r, Index c) const;
1220  // |||-|-|
1222  Index v, Index s, const Range& b,
1223  Index p, const Range& r, Index c) const;
1224  // ||-||-|
1226  Index v, const Range& s, Index b,
1227  Index p, const Range& r, Index c) const;
1228  // |-|||-|
1230  const Range& v, Index s, Index b,
1231  Index p, const Range& r, Index c) const;
1232  // -||||-|
1233  ConstMatrixView operator()( const Range& l,
1234  Index v, Index s, Index b,
1235  Index p, const Range& r, Index c) const;
1236  // |||--||
1238  Index v, Index s, const Range& b,
1239  const Range& p, Index r, Index c) const;
1240  // ||-|-||
1242  Index v, const Range& s, Index b,
1243  const Range& p, Index r, Index c) const;
1244  // |-||-||
1246  const Range& v, Index s, Index b,
1247  const Range& p, Index r, Index c) const;
1248  // -|||-||
1249  ConstMatrixView operator()( const Range& l,
1250  Index v, Index s, Index b,
1251  const Range& p, Index r, Index c) const;
1252  // ||--|||
1254  Index v, const Range& s, const Range& b,
1255  Index p, Index r, Index c) const;
1256  // |-|-|||
1258  const Range& v, Index s, const Range& b,
1259  Index p, Index r, Index c) const;
1260  // -||-|||
1261  ConstMatrixView operator()( const Range& l,
1262  Index v, Index s, const Range& b,
1263  Index p, Index r, Index c) const;
1264  // |--||||
1266  const Range& v, const Range& s, Index b,
1267  Index p, Index r, Index c) const;
1268  // -|-||||
1269  ConstMatrixView operator()( const Range& l,
1270  Index v, const Range& s, Index b,
1271  Index p, Index r, Index c) const;
1272  // --|||||
1273  ConstMatrixView operator()( const Range& l,
1274  const Range& v, Index s, Index b,
1275  Index p, Index r, Index c) const;
1276 
1277  // Result 1D (7 combinations)
1278  // ||||||-
1280  Index v, Index s, Index b,
1281  Index p, Index r, const Range& c) const;
1282  // |||||-|
1284  Index v, Index s, Index b,
1285  Index p, const Range& r, Index c) const;
1286  // ||||-||
1288  Index v, Index s, Index b,
1289  const Range& p, Index r, Index c) const;
1290  // |||-|||
1292  Index v, Index s, const Range& b,
1293  Index p, Index r, Index c) const;
1294  // ||-||||
1296  Index v, const Range& s, Index b,
1297  Index p, Index r, Index c) const;
1298  // |-|||||
1300  const Range& v, Index s, Index b,
1301  Index p, Index r, Index c) const;
1302  // -||||||
1303  ConstVectorView operator()( const Range& l,
1304  Index v, Index s, Index b,
1305  Index p, Index r, Index c) const;
1306 
1307  // Result scalar (1 combination)
1308  // |||||||
1310  Index v, Index s, Index b,
1311  Index p, Index r, Index c) const
1312  { return ConstTensor7View::operator()(l,v,s,b,p,r,c); }
1313 
1316  Index v, Index s, Index b,
1317  Index p, Index r, Index c) const
1318  { return ConstTensor7View::get(l,v,s,b,p,r,c); }
1319 
1320 
1321  // Non-const index operators:
1322 
1323  // Result 7D (1 combination)
1324  // -------
1325  Tensor7View operator()( const Range& l,
1326  const Range& v, const Range& s, const Range& b,
1327  const Range& p, const Range& r, const Range& c);
1328 
1329  // Result 6D (7 combinations)
1330  // ------|
1331  Tensor6View operator()( const Range& l,
1332  const Range& v, const Range& s, const Range& b,
1333  const Range& p, const Range& r, Index c);
1334  // -----|-
1335  Tensor6View operator()( const Range& l,
1336  const Range& v, const Range& s, const Range& b,
1337  const Range& p, Index r, const Range& c);
1338  // ----|--
1339  Tensor6View operator()( const Range& l,
1340  const Range& v, const Range& s, const Range& b,
1341  Index p, const Range& r, const Range& c);
1342  // ---|---
1343  Tensor6View operator()( const Range& l,
1344  const Range& v, const Range& s, Index b,
1345  const Range& p, const Range& r, const Range& c);
1346  // --|----
1347  Tensor6View operator()( const Range& l,
1348  const Range& v, Index s, const Range& b,
1349  const Range& p, const Range& r, const Range& c);
1350  // -|-----
1351  Tensor6View operator()( const Range& l,
1352  Index v, const Range& s, const Range& b,
1353  const Range& p, const Range& r, const Range& c);
1354  // |------
1356  const Range& v, const Range& s, const Range& b,
1357  const Range& p, const Range& r, const Range& c);
1358 
1359  // Result 5D (6+5+4+3+2+1 = 21 combinations)
1360  // -----||
1361  Tensor5View operator()( const Range& l,
1362  const Range& v, const Range& s, const Range& b,
1363  const Range& p, Index r, Index c);
1364  // ----|-|
1365  Tensor5View operator()( const Range& l,
1366  const Range& v, const Range& s, const Range& b,
1367  Index p, const Range& r, Index c);
1368  // ---|--|
1369  Tensor5View operator()( const Range& l,
1370  const Range& v, const Range& s, Index b,
1371  const Range& p, const Range& r, Index c);
1372  // --|---|
1373  Tensor5View operator()( const Range& l,
1374  const Range& v, Index s, const Range& b,
1375  const Range& p, const Range& r, Index c);
1376  // -|----|
1377  Tensor5View operator()( const Range& l,
1378  Index v, const Range& s, const Range& b,
1379  const Range& p, const Range& r, Index c);
1380  // |-----|
1382  const Range& v, const Range& s, const Range& b,
1383  const Range& p, const Range& r, Index c);
1384  // ----||-
1385  Tensor5View operator()( const Range& l,
1386  const Range& v, const Range& s, const Range& b,
1387  Index p, Index r, const Range& c);
1388  // ---|-|-
1389  Tensor5View operator()( const Range& l,
1390  const Range& v, const Range& s, Index b,
1391  const Range& p, Index r, const Range& c);
1392  // --|--|-
1393  Tensor5View operator()( const Range& l,
1394  const Range& v, Index s, const Range& b,
1395  const Range& p, Index r, const Range& c);
1396  // -|---|-
1397  Tensor5View operator()( const Range& l,
1398  Index v, const Range& s, const Range& b,
1399  const Range& p, Index r, const Range& c);
1400  // |----|-
1402  const Range& v, const Range& s, const Range& b,
1403  const Range& p, Index r, const Range& c);
1404  // ---||--
1405  Tensor5View operator()( const Range& l,
1406  const Range& v, const Range& s, Index b,
1407  Index p, const Range& r, const Range& c);
1408  // --|-|--
1409  Tensor5View operator()( const Range& l,
1410  const Range& v, Index s, const Range& b,
1411  Index p, const Range& r, const Range& c);
1412  // -|--|--
1413  Tensor5View operator()( const Range& l,
1414  Index v, const Range& s, const Range& b,
1415  Index p, const Range& r, const Range& c);
1416  // |---|--
1418  const Range& v, const Range& s, const Range& b,
1419  Index p, const Range& r, const Range& c);
1420  // --||---
1421  Tensor5View operator()( const Range& l,
1422  const Range& v, Index s, Index b,
1423  const Range& p, const Range& r, const Range& c);
1424  // -|-|---
1425  Tensor5View operator()( const Range& l,
1426  Index v, const Range& s, Index b,
1427  const Range& p, const Range& r, const Range& c);
1428  // |--|---
1430  const Range& v, const Range& s, Index b,
1431  const Range& p, const Range& r, const Range& c);
1432  // -||----
1433  Tensor5View operator()( const Range& l,
1434  Index v, Index s, const Range& b,
1435  const Range& p, const Range& r, const Range& c);
1436  // |-|----
1438  const Range& v, Index s, const Range& b,
1439  const Range& p, const Range& r, const Range& c);
1440  // ||-----
1442  Index v, const Range& s, const Range& b,
1443  const Range& p, const Range& r, const Range& c);
1444 
1445  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1446  // ----|||
1447  Tensor4View operator()( const Range& l,
1448  const Range& v, const Range& s, const Range& b,
1449  Index p, Index r, Index c);
1450  // ---|-||
1451  Tensor4View operator()( const Range& l,
1452  const Range& v, const Range& s, Index b,
1453  const Range& p, Index r, Index c);
1454  // --|--||
1455  Tensor4View operator()( const Range& l,
1456  const Range& v, Index s, const Range& b,
1457  const Range& p, Index r, Index c);
1458  // -|---||
1459  Tensor4View operator()( const Range& l,
1460  Index v, const Range& s, const Range& b,
1461  const Range& p, Index r, Index c);
1462  // |----||
1464  const Range& v, const Range& s, const Range& b,
1465  const Range& p, Index r, Index c);
1466  // ---||-|
1467  Tensor4View operator()( const Range& l,
1468  const Range& v, const Range& s, Index b,
1469  Index p, const Range& r, Index c);
1470  // --|-|-|
1471  Tensor4View operator()( const Range& l,
1472  const Range& v, Index s, const Range& b,
1473  Index p, const Range& r, Index c);
1474  // -|--|-|
1475  Tensor4View operator()( const Range& l,
1476  Index v, const Range& s, const Range& b,
1477  Index p, const Range& r, Index c);
1478  // |---|-|
1480  const Range& v, const Range& s, const Range& b,
1481  Index p, const Range& r, Index c);
1482  // --||--|
1483  Tensor4View operator()( const Range& l,
1484  const Range& v, Index s, Index b,
1485  const Range& p, const Range& r, Index c);
1486  // -|-|--|
1487  Tensor4View operator()( const Range& l,
1488  Index v, const Range& s, Index b,
1489  const Range& p, const Range& r, Index c);
1490  // |--|--|
1492  const Range& v, const Range& s, Index b,
1493  const Range& p, const Range& r, Index c);
1494  // -||---|
1495  Tensor4View operator()( const Range& l,
1496  Index v, Index s, const Range& b,
1497  const Range& p, const Range& r, Index c);
1498  // |-|---|
1500  const Range& v, Index s, const Range& b,
1501  const Range& p, const Range& r, Index c);
1502  // ||----|
1504  Index v, const Range& s, const Range& b,
1505  const Range& p, const Range& r, Index c);
1506  // ---|||-
1507  Tensor4View operator()( const Range& l,
1508  const Range& v, const Range& s, Index b,
1509  Index p, Index r, const Range& c);
1510  // --|-||-
1511  Tensor4View operator()( const Range& l,
1512  const Range& v, Index s, const Range& b,
1513  Index p, Index r, const Range& c);
1514  // -|--||-
1515  Tensor4View operator()( const Range& l,
1516  Index v, const Range& s, const Range& b,
1517  Index p, Index r, const Range& c);
1518  // |---||-
1520  const Range& v, const Range& s, const Range& b,
1521  Index p, Index r, const Range& c);
1522  // --||-|-
1523  Tensor4View operator()( const Range& l,
1524  const Range& v, Index s, Index b,
1525  const Range& p, Index r, const Range& c);
1526  // -|-|-|-
1527  Tensor4View operator()( const Range& l,
1528  Index v, const Range& s, Index b,
1529  const Range& p, Index r, const Range& c);
1530  // |--|-|-
1532  const Range& v, const Range& s, Index b,
1533  const Range& p, Index r, const Range& c);
1534  // -||--|-
1535  Tensor4View operator()( const Range& l,
1536  Index v, Index s, const Range& b,
1537  const Range& p, Index r, const Range& c);
1538  // |-|--|-
1540  const Range& v, Index s, const Range& b,
1541  const Range& p, Index r, const Range& c);
1542  // ||---|-
1544  Index v, const Range& s, const Range& b,
1545  const Range& p, Index r, const Range& c);
1546  // --|||--
1547  Tensor4View operator()( const Range& l,
1548  const Range& v, Index s, Index b,
1549  Index p, const Range& r, const Range& c);
1550  // -|-||--
1551  Tensor4View operator()( const Range& l,
1552  Index v, const Range& s, Index b,
1553  Index p, const Range& r, const Range& c);
1554  // |--||--
1556  const Range& v, const Range& s, Index b,
1557  Index p, const Range& r, const Range& c);
1558  // -||-|--
1559  Tensor4View operator()( const Range& l,
1560  Index v, Index s, const Range& b,
1561  Index p, const Range& r, const Range& c);
1562  // |-|-|--
1564  const Range& v, Index s, const Range& b,
1565  Index p, const Range& r, const Range& c);
1566  // ||--|--
1568  Index v, const Range& s, const Range& b,
1569  Index p, const Range& r, const Range& c);
1570  // -|||---
1571  Tensor4View operator()( const Range& l,
1572  Index v, Index s, Index b,
1573  const Range& p, const Range& r, const Range& c);
1574  // |-||---
1576  const Range& v, Index s, Index b,
1577  const Range& p, const Range& r, const Range& c);
1578  // ||-|---
1580  Index v, const Range& s, Index b,
1581  const Range& p, const Range& r, const Range& c);
1582  // |||----
1584  Index v, Index s, const Range& b,
1585  const Range& p, const Range& r, const Range& c);
1586 
1587  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1588  // ||||---
1590  Index v, Index s, Index b,
1591  const Range& p, const Range& r, const Range& c);
1592  // |||-|--
1594  Index v, Index s, const Range& b,
1595  Index p, const Range& r, const Range& c);
1596  // ||-||--
1598  Index v, const Range& s, Index b,
1599  Index p, const Range& r, const Range& c);
1600  // |-|||--
1602  const Range& v, Index s, Index b,
1603  Index p, const Range& r, const Range& c);
1604  // -||||--
1605  Tensor3View operator()( const Range& l,
1606  Index v, Index s, Index b,
1607  Index p, const Range& r, const Range& c);
1608  // |||--|-
1610  Index v, Index s, const Range& b,
1611  const Range& p, Index r, const Range& c);
1612  // ||-|-|-
1614  Index v, const Range& s, Index b,
1615  const Range& p, Index r, const Range& c);
1616  // |-||-|-
1618  const Range& v, Index s, Index b,
1619  const Range& p, Index r, const Range& c);
1620  // -|||-|-
1621  Tensor3View operator()( const Range& l,
1622  Index v, Index s, Index b,
1623  const Range& p, Index r, const Range& c);
1624  // ||--||-
1626  Index v, const Range& s, const Range& b,
1627  Index p, Index r, const Range& c);
1628  // |-|-||-
1630  const Range& v, Index s, const Range& b,
1631  Index p, Index r, const Range& c);
1632  // -||-||-
1633  Tensor3View operator()( const Range& l,
1634  Index v, Index s, const Range& b,
1635  Index p, Index r, const Range& c);
1636  // |--|||-
1638  const Range& v, const Range& s, Index b,
1639  Index p, Index r, const Range& c);
1640  // -|-|||-
1641  Tensor3View operator()( const Range& l,
1642  Index v, const Range& s, Index b,
1643  Index p, Index r, const Range& c);
1644  // --||||-
1645  Tensor3View operator()( const Range& l,
1646  const Range& v, Index s, Index b,
1647  Index p, Index r, const Range& c);
1648  // |||---|
1650  Index v, Index s, const Range& b,
1651  const Range& p, const Range& r, Index c);
1652  // ||-|--|
1654  Index v, const Range& s, Index b,
1655  const Range& p, const Range& r, Index c);
1656  // |-||--|
1658  const Range& v, Index s, Index b,
1659  const Range& p, const Range& r, Index c);
1660  // -|||--|
1661  Tensor3View operator()( const Range& l,
1662  Index v, Index s, Index b,
1663  const Range& p, const Range& r, Index c);
1664  // ||--|-|
1666  Index v, const Range& s, const Range& b,
1667  Index p, const Range& r, Index c);
1668  // |-|-|-|
1670  const Range& v, Index s, const Range& b,
1671  Index p, const Range& r, Index c);
1672  // -||-|-|
1673  Tensor3View operator()( const Range& l,
1674  Index v, Index s, const Range& b,
1675  Index p, const Range& r, Index c);
1676  // |--||-|
1678  const Range& v, const Range& s, Index b,
1679  Index p, const Range& r, Index c);
1680  // -|-||-|
1681  Tensor3View operator()( const Range& l,
1682  Index v, const Range& s, Index b,
1683  Index p, const Range& r, Index c);
1684  // --|||-|
1685  Tensor3View operator()( const Range& l,
1686  const Range& v, Index s, Index b,
1687  Index p, const Range& r, Index c);
1688  // ||---||
1690  Index v, const Range& s, const Range& b,
1691  const Range& p, Index r, Index c);
1692  // |-|--||
1694  const Range& v, Index s, const Range& b,
1695  const Range& p, Index r, Index c);
1696  // -||--||
1697  Tensor3View operator()( const Range& l,
1698  Index v, Index s, const Range& b,
1699  const Range& p, Index r, Index c);
1700  // |--|-||
1702  const Range& v, const Range& s, Index b,
1703  const Range& p, Index r, Index c);
1704  // -|-|-||
1705  Tensor3View operator()( const Range& l,
1706  Index v, const Range& s, Index b,
1707  const Range& p, Index r, Index c);
1708  // --||-||
1709  Tensor3View operator()( const Range& l,
1710  const Range& v, Index s, Index b,
1711  const Range& p, Index r, Index c);
1712  // |---|||
1714  const Range& v, const Range& s, const Range& b,
1715  Index p, Index r, Index c);
1716  // -|--|||
1717  Tensor3View operator()( const Range& l,
1718  Index v, const Range& s, const Range& b,
1719  Index p, Index r, Index c);
1720  // --|-|||
1721  Tensor3View operator()( const Range& l,
1722  const Range& v, Index s, const Range& b,
1723  Index p, Index r, Index c);
1724  // ---||||
1725  Tensor3View operator()( const Range& l,
1726  const Range& v, const Range& s, Index b,
1727  Index p, Index r, Index c);
1728 
1729  // Result 2D (6+5+4+3+2+1 = 21 combinations)
1730  // |||||--
1732  Index v, Index s, Index b,
1733  Index p, const Range& r, const Range& c);
1734  // ||||-|-
1736  Index v, Index s, Index b,
1737  const Range& p, Index r, const Range& c);
1738  // |||-||-
1740  Index v, Index s, const Range& b,
1741  Index p, Index r, const Range& c);
1742  // ||-|||-
1744  Index v, const Range& s, Index b,
1745  Index p, Index r, const Range& c);
1746  // |-||||-
1748  const Range& v, Index s, Index b,
1749  Index p, Index r, const Range& c);
1750  // -|||||-
1751  MatrixView operator()( const Range& l,
1752  Index v, Index s, Index b,
1753  Index p, Index r, const Range& c);
1754  // ||||--|
1756  Index v, Index s, Index b,
1757  const Range& p, const Range& r, Index c);
1758  // |||-|-|
1760  Index v, Index s, const Range& b,
1761  Index p, const Range& r, Index c);
1762  // ||-||-|
1764  Index v, const Range& s, Index b,
1765  Index p, const Range& r, Index c);
1766  // |-|||-|
1768  const Range& v, Index s, Index b,
1769  Index p, const Range& r, Index c);
1770  // -||||-|
1771  MatrixView operator()( const Range& l,
1772  Index v, Index s, Index b,
1773  Index p, const Range& r, Index c);
1774  // |||--||
1776  Index v, Index s, const Range& b,
1777  const Range& p, Index r, Index c);
1778  // ||-|-||
1780  Index v, const Range& s, Index b,
1781  const Range& p, Index r, Index c);
1782  // |-||-||
1784  const Range& v, Index s, Index b,
1785  const Range& p, Index r, Index c);
1786  // -|||-||
1787  MatrixView operator()( const Range& l,
1788  Index v, Index s, Index b,
1789  const Range& p, Index r, Index c);
1790  // ||--|||
1792  Index v, const Range& s, const Range& b,
1793  Index p, Index r, Index c);
1794  // |-|-|||
1796  const Range& v, Index s, const Range& b,
1797  Index p, Index r, Index c);
1798  // -||-|||
1799  MatrixView operator()( const Range& l,
1800  Index v, Index s, const Range& b,
1801  Index p, Index r, Index c);
1802  // |--||||
1804  const Range& v, const Range& s, Index b,
1805  Index p, Index r, Index c);
1806  // -|-||||
1807  MatrixView operator()( const Range& l,
1808  Index v, const Range& s, Index b,
1809  Index p, Index r, Index c);
1810  // --|||||
1811  MatrixView operator()( const Range& l,
1812  const Range& v, Index s, Index b,
1813  Index p, Index r, Index c);
1814 
1815  // Result 1D (7 combinations)
1816  // ||||||-
1818  Index v, Index s, Index b,
1819  Index p, Index r, const Range& c);
1820  // |||||-|
1822  Index v, Index s, Index b,
1823  Index p, const Range& r, Index c);
1824  // ||||-||
1826  Index v, Index s, Index b,
1827  const Range& p, Index r, Index c);
1828  // |||-|||
1830  Index v, Index s, const Range& b,
1831  Index p, Index r, Index c);
1832  // ||-||||
1834  Index v, const Range& s, Index b,
1835  Index p, Index r, Index c);
1836  // |-|||||
1838  const Range& v, Index s, Index b,
1839  Index p, Index r, Index c);
1840  // -||||||
1841  VectorView operator()( const Range& l,
1842  Index v, Index s, Index b,
1843  Index p, Index r, Index c);
1844 
1845  // Result scalar (1 combination)
1846  // |||||||
1848  Index v, Index s, Index b,
1849  Index p, Index r, Index c)
1850  { CHECK(l);
1851  CHECK(v);
1852  CHECK(s);
1853  CHECK(b);
1854  CHECK(p);
1855  CHECK(r);
1856  CHECK(c);
1857  return get(l, v, s, b, p, r, c);
1858  }
1859 
1862  Index v, Index s, Index b,
1863  Index p, Index r, Index c)
1864  {
1865  return *(mdata + OFFSET(l) +
1866  OFFSET(v) + OFFSET(s) + OFFSET(b) +
1867  OFFSET(p) + OFFSET(r) + OFFSET(c) );
1868  }
1869 
1870 
1871  // Conversion to a plain C-array
1872  const Numeric *get_c_array() const;
1873  Numeric *get_c_array();
1874 
1875  // Functions returning const iterators:
1876  ConstIterator7D begin() const;
1877  ConstIterator7D end() const;
1878  // Functions returning iterators:
1879  Iterator7D begin();
1880  Iterator7D end();
1881 
1882  // Assignment operators:
1884  Tensor7View& operator=(const Tensor7View& v);
1885  Tensor7View& operator=(const Tensor7& v);
1887 
1888  // Other operators:
1893 
1898 
1900  virtual ~Tensor7View() {}
1901 
1902  // Friends:
1903 
1904  // Special constructor to make a Tensor7 view of a Tensor6.
1905  Tensor7View(const Tensor6View& a);
1906 
1907 protected:
1908  // Constructors:
1909  Tensor7View();
1910  Tensor7View(Numeric *data,
1911  const Range& l,
1912  const Range& v, const Range& s, const Range& b,
1913  const Range& p, const Range& r, const Range& c);
1914  Tensor7View(Numeric *data,
1915  const Range& pl,
1916  const Range& pv, const Range& ps, const Range& pb,
1917  const Range& pp, const Range& pr, const Range& pc,
1918  const Range& nl,
1919  const Range& nv, const Range& ns, const Range& nb,
1920  const Range& np, const Range& nr, const Range& nc);
1921 };
1922 
1931 class Tensor7 : public Tensor7View {
1932 public:
1933  // Constructors:
1934  Tensor7();
1935  Tensor7(Index l,
1936  Index v, Index s, Index b,
1937  Index p, Index r, Index c);
1938  Tensor7(Index l,
1939  Index v, Index s, Index b,
1940  Index p, Index r, Index c,
1941  Numeric fill);
1942  Tensor7(const ConstTensor7View& v);
1943  Tensor7(const Tensor7& v);
1944 
1945  // Assignment operators:
1948 
1949  // Resize function:
1950  void resize(Index l,
1951  Index v, Index s, Index b,
1952  Index p, Index r, Index c);
1953 
1954  // Swap function:
1955  friend void swap(Tensor7& t1, Tensor7& t2);
1956 
1957  // Destructor:
1958  virtual ~Tensor7();
1959 };
1960 
1961 
1962 // Function declarations:
1963 // ----------------------
1964 
1965 void copy(ConstIterator7D origin,
1966  const ConstIterator7D& end,
1967  Iterator7D target);
1968 
1969 void copy(Numeric x,
1970  Iterator7D target,
1971  const Iterator7D& end);
1972 
1973 void transform( Tensor7View y,
1974  double (&my_func)(double),
1975  ConstTensor7View x );
1976 
1977 Numeric max(const ConstTensor7View& x);
1978 
1979 Numeric min(const ConstTensor7View& x);
1980 
1981 std::ostream& operator<<(std::ostream& os, const ConstTensor7View& v);
1982 
1984 // Helper function for debugging
1985 #ifndef NDEBUG
1986 
1988  Index b, Index p, Index r, Index c);
1989 
1990 #endif
1991 
1993 #endif // matpackVII_h
ConstIterator7D
Const version of Iterator7D.
Definition: matpackVII.h:90
Tensor7View
The Tensor7View class.
Definition: matpackVII.h:780
ConstTensor7View::get
Numeric get(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Definition: matpackVII.h:713
ConstTensor7View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVII.cc:44
MatrixView
The MatrixView class.
Definition: matpackI.h:679
Tensor7View::end
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVII.cc:4908
min
Numeric min(const ConstTensor7View &x)
Min function, tensor version.
Definition: matpackVII.cc:5519
ConstTensor6View::mvr
Range mvr
The vitrine range of mdata that is actually used.
Definition: matpackVI.h:425
ConstTensor7View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVII.h:758
ConstTensor6View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackVI.h:429
ConstTensor7View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVII.cc:68
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:162
Tensor7View::operator-=
Tensor7View & operator-=(Numeric x)
Subtraction of scalar.
Definition: matpackVII.cc:5042
ConstTensor7View::mrr
Range mrr
The row range of mdata that is actually used.
Definition: matpackVII.h:764
ConstTensor7View::mlr
Range mlr
The library range of mdata that is actually used.
Definition: matpackVII.h:754
OFFSET
#define OFFSET(x)
Definition: matpackVI.h:34
ConstIterator7D::operator*
const ConstTensor6View & operator*() const
Dereferencing.
Definition: matpackVII.h:135
Iterator7D
Implementation of Tensors of Rank 7.
Definition: matpackVII.h:36
Iterator7D::operator!=
bool operator!=(const Iterator7D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackVII.h:54
Iterator7D::mstride
Index mstride
Stride.
Definition: matpackVII.h:86
ConstTensor7View::begin
ConstIterator7D begin() const
Return const iterator to first sub-tensor.
Definition: matpackVII.cc:1853
Range::mstart
Index mstart
The start index.
Definition: matpackI.h:204
Tensor7View::operator+=
Tensor7View & operator+=(Numeric x)
Addition of scalar.
Definition: matpackVII.cc:5031
CHECK
#define CHECK(x)
Implementation of Tensors of Rank 6.
Definition: matpackVI.h:33
ConstTensor6View::mrr
Range mrr
The row range of mdata that is actually used.
Definition: matpackVI.h:433
Tensor7::~Tensor7
virtual ~Tensor7()
Destructor for Tensor7.
Definition: matpackVII.cc:5449
debug_tensor7view_get_elem
Numeric debug_tensor7view_get_elem(Tensor7View &tv, Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Definition: matpackVII.cc:5563
ConstIterator7D::mstride
Index mstride
Stride.
Definition: matpackVII.h:141
ConstIterator7D::operator!=
bool operator!=(const ConstIterator7D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackVII.h:109
ConstTensor7View::nlibraries
Index nlibraries() const
Returns the number of libraries.
Definition: matpackVII.cc:32
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:141
Tensor3View
The Tensor3View class.
Definition: matpackIII.h:232
ConstIterator7D::operator++
ConstIterator7D & operator++()
Prefix increment operator.
Definition: matpackVII.h:103
ConstTensor6View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackVI.h:437
Iterator7D::msv
Tensor6View msv
Current position.
Definition: matpackVII.h:84
Tensor7::resize
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVII.cc:5379
ConstTensor6View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackVI.h:431
Tensor7View::Tensor7View
Tensor7View()
Default constructor.
Definition: matpackVII.cc:5154
Tensor7View::begin
ConstIterator7D begin() const
Return iterator to sub-tensor.
Definition: matpackVII.cc:4902
VectorView
The VectorView class.
Definition: matpackI.h:372
Iterator7D::operator++
Iterator7D & operator++()
Prefix increment operator.
Definition: matpackVII.h:48
Tensor7View::operator=
Tensor7View & operator=(const ConstTensor7View &v)
Assignment operator.
Definition: matpackVII.cc:4944
ConstTensor7View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVII.cc:38
ConstTensor6View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVI.h:427
ns
#define ns
Definition: continua.cc:21931
max
Numeric max(const ConstTensor7View &x)
Max function, tensor version.
Definition: matpackVII.cc:5497
ConstTensor7View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVII.cc:56
ConstTensor6View
A constant view of a Tensor6.
Definition: matpackVI.h:159
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
Tensor5View
The Tensor5View class.
Definition: matpackV.h:276
Iterator7D::Iterator7D
Iterator7D(const Tensor6View &x, Index stride)
Explicit constructor.
Definition: matpackVII.h:43
ConstTensor7View::end
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVII.cc:1866
Tensor7View::operator()
ConstTensor7View operator()(const Range &l, const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Definition: matpackVII.cc:2000
Tensor7View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackVII.cc:4885
ConstTensor7View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackVII.h:762
Iterator7D::operator*
Tensor6View & operator*()
Dereferencing.
Definition: matpackVII.h:80
ConstTensor7View::mvr
Range mvr
The vitrine range of mdata that is actually used.
Definition: matpackVII.h:756
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:596
ConstTensor7View::operator()
ConstTensor7View operator()(const Range &l, const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Definition: matpackVII.cc:77
Tensor7View::operator/=
Tensor7View & operator/=(Numeric x)
Division by scalar.
Definition: matpackVII.cc:5020
Tensor7View::get
Numeric get(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Definition: matpackVII.h:1315
Range
The range class.
Definition: matpackI.h:148
ConstTensor7View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackVII.h:760
Tensor7View::~Tensor7View
virtual ~Tensor7View()
Destructor.
Definition: matpackVII.h:1900
ConstTensor7View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVII.cc:50
Iterator7D::Iterator7D
Iterator7D()
Default constructor.
Definition: matpackVII.h:40
Tensor7::operator=
Tensor7 & operator=(Tensor7 x)
Assignment operator from another tensor.
Definition: matpackVII.cc:5362
ConstTensor6View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackVI.h:435
Tensor7View::get
Numeric & get(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Definition: matpackVII.h:1861
Tensor7View::operator*=
Tensor7View & operator*=(Numeric x)
Multiplication by scalar.
Definition: matpackVII.cc:5009
copy
void copy(ConstIterator7D origin, const ConstIterator7D &end, Iterator7D target)
Copy data between begin and end to target.
Definition: matpackVII.cc:5223
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:139
Tensor4View
The Tensor4View class.
Definition: matpackIV.h:243
ConstIterator7D::operator->
const ConstTensor6View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Definition: matpackVII.h:132
ConstTensor7View::~ConstTensor7View
virtual ~ConstTensor7View()
Destructor.
Definition: matpackVII.h:728
ConstIterator7D::ConstIterator7D
ConstIterator7D(const ConstTensor6View &x, Index stride)
Explicit constructor.
Definition: matpackVII.h:97
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
ConstTensor7View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVII.cc:62
ConstTensor7View::ConstTensor7View
ConstTensor7View()
Default constructor.
Definition: matpackVII.cc:1901
ConstIterator7D::msv
ConstTensor6View msv
Current position.
Definition: matpackVII.h:139
Tensor7::Tensor7
Tensor7()
Default constructor.
Definition: matpackVII.cc:5255
Iterator7D::operator->
Tensor6View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Definition: matpackVII.h:77
ConstTensor7View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackVII.h:766
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
ConstIterator7D::ConstIterator7D
ConstIterator7D()
Default constructor.
Definition: matpackVII.h:94
matpackVI.h
transform
void transform(Tensor7View y, double(&my_func)(double), ConstTensor7View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Definition: matpackVII.cc:5472
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:152
operator<<
std::ostream & operator<<(std::ostream &os, const ConstTensor7View &v)
Output operator.
Definition: matpackVII.cc:1971
Tensor7
The Tensor7 class.
Definition: matpackVII.h:1931
Tensor6View
The Tensor6View class.
Definition: matpackVI.h:449
Tensor7::swap
friend void swap(Tensor7 &t1, Tensor7 &t2)
Swaps two objects.
Definition: matpackVII.cc:5434
ConstTensor7View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackVII.h:768