ARTS  2.0.49
matpackVII.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2008 Stefan Buehler <sbuehler@ltu.se>
2 
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7 
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17 
28 #ifndef matpackVII_h
29 #define matpackVII_h
30 
31 #include "matpackVI.h"
32 
35 class Iterator7D {
36 public:
37  // Constructors:
39  Iterator7D() : msv(), mstride(0) { /* Nothing to do here. */ }
40 
43  { /* Nothing to do here. */ }
44 
46  Iterator7D(const Tensor6View& x, Index stride) : msv(x), mstride(stride)
47  { /* Nothing to do here. */ }
48 
49  // Operators:
51  Iterator7D& operator++() { msv.mdata += mstride; return *this; }
52 
57  bool operator!=(const Iterator7D& other) const
58  { if ( msv.mdata +
59  msv.mvr.mstart +
60  msv.msr.mstart +
61  msv.mbr.mstart +
62  msv.mpr.mstart +
63  msv.mrr.mstart +
64  msv.mcr.mstart
65  !=
66  other.msv.mdata +
67  other.msv.mvr.mstart +
68  other.msv.msr.mstart +
69  other.msv.mbr.mstart +
70  other.msv.mpr.mstart +
71  other.msv.mrr.mstart +
72  other.msv.mcr.mstart )
73  return true;
74  else
75  return false;
76  }
77 
80  Tensor6View* operator->() { return &msv; }
81 
83  Tensor6View& operator*() { return msv; }
84 
85 private:
90 };
91 
94 public:
95  // Constructors:
97  ConstIterator7D() : msv(), mstride(0) { /* Nothing to do here. */ }
98 
101  { /* Nothing to do here. */ }
102 
105  : msv(x), mstride(stride)
106  { /* Nothing to do here. */ }
107 
108  // Operators:
110  ConstIterator7D& operator++() { msv.mdata += mstride; return *this; }
111 
116  bool operator!=(const ConstIterator7D& other) const
117  { if ( msv.mdata +
118  msv.mvr.mstart +
119  msv.msr.mstart +
120  msv.mbr.mstart +
121  msv.mpr.mstart +
122  msv.mrr.mstart +
123  msv.mcr.mstart
124  !=
125  other.msv.mdata +
126  other.msv.mvr.mstart +
127  other.msv.msr.mstart +
128  other.msv.mbr.mstart +
129  other.msv.mpr.mstart +
130  other.msv.mrr.mstart +
131  other.msv.mcr.mstart )
132  return true;
133  else
134  return false;
135  }
136 
139  const ConstTensor6View* operator->() const { return &msv; }
140 
142  const ConstTensor6View& operator*() const { return msv; }
143 
144 private:
149 };
150 
151 
152 // Declare class Tensor7:
153 class Tensor7;
154 
155 
170 public:
171  // Member functions:
172  Index nlibraries() const;
173  Index nvitrines() const;
174  Index nshelves() const;
175  Index nbooks() const;
176  Index npages() const;
177  Index nrows() const;
178  Index ncols() const;
179 
180  // Const index operators:
181 
182  // Result 7D (1 combination)
183  // -------
185  const Range& v, const Range& s, const Range& b,
186  const Range& p, const Range& r, const Range& c) const;
187 
188  // Result 6D (7 combinations)
189  // ------|
191  const Range& v, const Range& s, const Range& b,
192  const Range& p, const Range& r, Index c) const;
193  // -----|-
195  const Range& v, const Range& s, const Range& b,
196  const Range& p, Index r, const Range& c) const;
197  // ----|--
199  const Range& v, const Range& s, const Range& b,
200  Index p, const Range& r, const Range& c) const;
201  // ---|---
203  const Range& v, const Range& s, Index b,
204  const Range& p, const Range& r, const Range& c) const;
205  // --|----
207  const Range& v, Index s, const Range& b,
208  const Range& p, const Range& r, const Range& c) const;
209  // -|-----
211  Index v, const Range& s, const Range& b,
212  const Range& p, const Range& r, const Range& c) const;
213  // |------
215  const Range& v, const Range& s, const Range& b,
216  const Range& p, const Range& r, const Range& c) const;
217 
218  // Result 5D (6+5+4+3+2+1 = 21 combinations)
219  // -----||
221  const Range& v, const Range& s, const Range& b,
222  const Range& p, Index r, Index c) const;
223  // ----|-|
225  const Range& v, const Range& s, const Range& b,
226  Index p, const Range& r, Index c) const;
227  // ---|--|
229  const Range& v, const Range& s, Index b,
230  const Range& p, const Range& r, Index c) const;
231  // --|---|
233  const Range& v, Index s, const Range& b,
234  const Range& p, const Range& r, Index c) const;
235  // -|----|
237  Index v, const Range& s, const Range& b,
238  const Range& p, const Range& r, Index c) const;
239  // |-----|
241  const Range& v, const Range& s, const Range& b,
242  const Range& p, const Range& r, Index c) const;
243  // ----||-
245  const Range& v, const Range& s, const Range& b,
246  Index p, Index r, const Range& c) const;
247  // ---|-|-
249  const Range& v, const Range& s, Index b,
250  const Range& p, Index r, const Range& c) const;
251  // --|--|-
253  const Range& v, Index s, const Range& b,
254  const Range& p, Index r, const Range& c) const;
255  // -|---|-
257  Index v, const Range& s, const Range& b,
258  const Range& p, Index r, const Range& c) const;
259  // |----|-
261  const Range& v, const Range& s, const Range& b,
262  const Range& p, Index r, const Range& c) const;
263  // ---||--
265  const Range& v, const Range& s, Index b,
266  Index p, const Range& r, const Range& c) const;
267  // --|-|--
269  const Range& v, Index s, const Range& b,
270  Index p, const Range& r, const Range& c) const;
271  // -|--|--
273  Index v, const Range& s, const Range& b,
274  Index p, const Range& r, const Range& c) const;
275  // |---|--
277  const Range& v, const Range& s, const Range& b,
278  Index p, const Range& r, const Range& c) const;
279  // --||---
281  const Range& v, Index s, Index b,
282  const Range& p, const Range& r, const Range& c) const;
283  // -|-|---
285  Index v, const Range& s, Index b,
286  const Range& p, const Range& r, const Range& c) const;
287  // |--|---
289  const Range& v, const Range& s, Index b,
290  const Range& p, const Range& r, const Range& c) const;
291  // -||----
293  Index v, Index s, const Range& b,
294  const Range& p, const Range& r, const Range& c) const;
295  // |-|----
297  const Range& v, Index s, const Range& b,
298  const Range& p, const Range& r, const Range& c) const;
299  // ||-----
301  Index v, const Range& s, const Range& b,
302  const Range& p, const Range& r, const Range& c) const;
303 
304  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
305  // ----|||
307  const Range& v, const Range& s, const Range& b,
308  Index p, Index r, Index c) const;
309  // ---|-||
311  const Range& v, const Range& s, Index b,
312  const Range& p, Index r, Index c) const;
313  // --|--||
315  const Range& v, Index s, const Range& b,
316  const Range& p, Index r, Index c) const;
317  // -|---||
319  Index v, const Range& s, const Range& b,
320  const Range& p, Index r, Index c) const;
321  // |----||
323  const Range& v, const Range& s, const Range& b,
324  const Range& p, Index r, Index c) const;
325  // ---||-|
327  const Range& v, const Range& s, Index b,
328  Index p, const Range& r, Index c) const;
329  // --|-|-|
331  const Range& v, Index s, const Range& b,
332  Index p, const Range& r, Index c) const;
333  // -|--|-|
335  Index v, const Range& s, const Range& b,
336  Index p, const Range& r, Index c) const;
337  // |---|-|
339  const Range& v, const Range& s, const Range& b,
340  Index p, const Range& r, Index c) const;
341  // --||--|
343  const Range& v, Index s, Index b,
344  const Range& p, const Range& r, Index c) const;
345  // -|-|--|
347  Index v, const Range& s, Index b,
348  const Range& p, const Range& r, Index c) const;
349  // |--|--|
351  const Range& v, const Range& s, Index b,
352  const Range& p, const Range& r, Index c) const;
353  // -||---|
355  Index v, Index s, const Range& b,
356  const Range& p, const Range& r, Index c) const;
357  // |-|---|
359  const Range& v, Index s, const Range& b,
360  const Range& p, const Range& r, Index c) const;
361  // ||----|
363  Index v, const Range& s, const Range& b,
364  const Range& p, const Range& r, Index c) const;
365  // ---|||-
367  const Range& v, const Range& s, Index b,
368  Index p, Index r, const Range& c) const;
369  // --|-||-
371  const Range& v, Index s, const Range& b,
372  Index p, Index r, const Range& c) const;
373  // -|--||-
375  Index v, const Range& s, const Range& b,
376  Index p, Index r, const Range& c) const;
377  // |---||-
379  const Range& v, const Range& s, const Range& b,
380  Index p, Index r, const Range& c) const;
381  // --||-|-
383  const Range& v, Index s, Index b,
384  const Range& p, Index r, const Range& c) const;
385  // -|-|-|-
387  Index v, const Range& s, Index b,
388  const Range& p, Index r, const Range& c) const;
389  // |--|-|-
391  const Range& v, const Range& s, Index b,
392  const Range& p, Index r, const Range& c) const;
393  // -||--|-
395  Index v, Index s, const Range& b,
396  const Range& p, Index r, const Range& c) const;
397  // |-|--|-
399  const Range& v, Index s, const Range& b,
400  const Range& p, Index r, const Range& c) const;
401  // ||---|-
403  Index v, const Range& s, const Range& b,
404  const Range& p, Index r, const Range& c) const;
405  // --|||--
407  const Range& v, Index s, Index b,
408  Index p, const Range& r, const Range& c) const;
409  // -|-||--
411  Index v, const Range& s, Index b,
412  Index p, const Range& r, const Range& c) const;
413  // |--||--
415  const Range& v, const Range& s, Index b,
416  Index p, const Range& r, const Range& c) const;
417  // -||-|--
419  Index v, Index s, const Range& b,
420  Index p, const Range& r, const Range& c) const;
421  // |-|-|--
423  const Range& v, Index s, const Range& b,
424  Index p, const Range& r, const Range& c) const;
425  // ||--|--
427  Index v, const Range& s, const Range& b,
428  Index p, const Range& r, const Range& c) const;
429  // -|||---
431  Index v, Index s, Index b,
432  const Range& p, const Range& r, const Range& c) const;
433  // |-||---
435  const Range& v, Index s, Index b,
436  const Range& p, const Range& r, const Range& c) const;
437  // ||-|---
439  Index v, const Range& s, Index b,
440  const Range& p, const Range& r, const Range& c) const;
441  // |||----
443  Index v, Index s, const Range& b,
444  const Range& p, const Range& r, const Range& c) const;
445 
446  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
447  // ||||---
449  Index v, Index s, Index b,
450  const Range& p, const Range& r, const Range& c) const;
451  // |||-|--
453  Index v, Index s, const Range& b,
454  Index p, const Range& r, const Range& c) const;
455  // ||-||--
457  Index v, const Range& s, Index b,
458  Index p, const Range& r, const Range& c) const;
459  // |-|||--
461  const Range& v, Index s, Index b,
462  Index p, const Range& r, const Range& c) const;
463  // -||||--
465  Index v, Index s, Index b,
466  Index p, const Range& r, const Range& c) const;
467  // |||--|-
469  Index v, Index s, const Range& b,
470  const Range& p, Index r, const Range& c) const;
471  // ||-|-|-
473  Index v, const Range& s, Index b,
474  const Range& p, Index r, const Range& c) const;
475  // |-||-|-
477  const Range& v, Index s, Index b,
478  const Range& p, Index r, const Range& c) const;
479  // -|||-|-
481  Index v, Index s, Index b,
482  const Range& p, Index r, const Range& c) const;
483  // ||--||-
485  Index v, const Range& s, const Range& b,
486  Index p, Index r, const Range& c) const;
487  // |-|-||-
489  const Range& v, Index s, const Range& b,
490  Index p, Index r, const Range& c) const;
491  // -||-||-
493  Index v, Index s, const Range& b,
494  Index p, Index r, const Range& c) const;
495  // |--|||-
497  const Range& v, const Range& s, Index b,
498  Index p, Index r, const Range& c) const;
499  // -|-|||-
501  Index v, const Range& s, Index b,
502  Index p, Index r, const Range& c) const;
503  // --||||-
505  const Range& v, Index s, Index b,
506  Index p, Index r, const Range& c) const;
507  // |||---|
509  Index v, Index s, const Range& b,
510  const Range& p, const Range& r, Index c) const;
511  // ||-|--|
513  Index v, const Range& s, Index b,
514  const Range& p, const Range& r, Index c) const;
515  // |-||--|
517  const Range& v, Index s, Index b,
518  const Range& p, const Range& r, Index c) const;
519  // -|||--|
521  Index v, Index s, Index b,
522  const Range& p, const Range& r, Index c) const;
523  // ||--|-|
525  Index v, const Range& s, const Range& b,
526  Index p, const Range& r, Index c) const;
527  // |-|-|-|
529  const Range& v, Index s, const Range& b,
530  Index p, const Range& r, Index c) const;
531  // -||-|-|
533  Index v, Index s, const Range& b,
534  Index p, const Range& r, Index c) const;
535  // |--||-|
537  const Range& v, const Range& s, Index b,
538  Index p, const Range& r, Index c) const;
539  // -|-||-|
541  Index v, const Range& s, Index b,
542  Index p, const Range& r, Index c) const;
543  // --|||-|
545  const Range& v, Index s, Index b,
546  Index p, const Range& r, Index c) const;
547  // ||---||
549  Index v, const Range& s, const Range& b,
550  const Range& p, Index r, Index c) const;
551  // |-|--||
553  const Range& v, Index s, const Range& b,
554  const Range& p, Index r, Index c) const;
555  // -||--||
557  Index v, Index s, const Range& b,
558  const Range& p, Index r, Index c) const;
559  // |--|-||
561  const Range& v, const Range& s, Index b,
562  const Range& p, Index r, Index c) const;
563  // -|-|-||
565  Index v, const Range& s, Index b,
566  const Range& p, Index r, Index c) const;
567  // --||-||
569  const Range& v, Index s, Index b,
570  const Range& p, Index r, Index c) const;
571  // |---|||
573  const Range& v, const Range& s, const Range& b,
574  Index p, Index r, Index c) const;
575  // -|--|||
577  Index v, const Range& s, const Range& b,
578  Index p, Index r, Index c) const;
579  // --|-|||
581  const Range& v, Index s, const Range& b,
582  Index p, Index r, Index c) const;
583  // ---||||
585  const Range& v, const Range& s, Index b,
586  Index p, Index r, Index c) const;
587 
588  // Result 2D (6+5+4+3+2+1 = 21 combinations)
589  // |||||--
591  Index v, Index s, Index b,
592  Index p, const Range& r, const Range& c) const;
593  // ||||-|-
595  Index v, Index s, Index b,
596  const Range& p, Index r, const Range& c) const;
597  // |||-||-
599  Index v, Index s, const Range& b,
600  Index p, Index r, const Range& c) const;
601  // ||-|||-
603  Index v, const Range& s, Index b,
604  Index p, Index r, const Range& c) const;
605  // |-||||-
607  const Range& v, Index s, Index b,
608  Index p, Index r, const Range& c) const;
609  // -|||||-
610  ConstMatrixView operator()( const Range& l,
611  Index v, Index s, Index b,
612  Index p, Index r, const Range& c) const;
613  // ||||--|
615  Index v, Index s, Index b,
616  const Range& p, const Range& r, Index c) const;
617  // |||-|-|
619  Index v, Index s, const Range& b,
620  Index p, const Range& r, Index c) const;
621  // ||-||-|
623  Index v, const Range& s, Index b,
624  Index p, const Range& r, Index c) const;
625  // |-|||-|
627  const Range& v, Index s, Index b,
628  Index p, const Range& r, Index c) const;
629  // -||||-|
630  ConstMatrixView operator()( const Range& l,
631  Index v, Index s, Index b,
632  Index p, const Range& r, Index c) const;
633  // |||--||
635  Index v, Index s, const Range& b,
636  const Range& p, Index r, Index c) const;
637  // ||-|-||
639  Index v, const Range& s, Index b,
640  const Range& p, Index r, Index c) const;
641  // |-||-||
643  const Range& v, Index s, Index b,
644  const Range& p, Index r, Index c) const;
645  // -|||-||
646  ConstMatrixView operator()( const Range& l,
647  Index v, Index s, Index b,
648  const Range& p, Index r, Index c) const;
649  // ||--|||
651  Index v, const Range& s, const Range& b,
652  Index p, Index r, Index c) const;
653  // |-|-|||
655  const Range& v, Index s, const Range& b,
656  Index p, Index r, Index c) const;
657  // -||-|||
658  ConstMatrixView operator()( const Range& l,
659  Index v, Index s, const Range& b,
660  Index p, Index r, Index c) const;
661  // |--||||
663  const Range& v, const Range& s, Index b,
664  Index p, Index r, Index c) const;
665  // -|-||||
666  ConstMatrixView operator()( const Range& l,
667  Index v, const Range& s, Index b,
668  Index p, Index r, Index c) const;
669  // --|||||
670  ConstMatrixView operator()( const Range& l,
671  const Range& v, Index s, Index b,
672  Index p, Index r, Index c) const;
673 
674  // Result 1D (7 combinations)
675  // ||||||-
677  Index v, Index s, Index b,
678  Index p, Index r, const Range& c) const;
679  // |||||-|
681  Index v, Index s, Index b,
682  Index p, const Range& r, Index c) const;
683  // ||||-||
685  Index v, Index s, Index b,
686  const Range& p, Index r, Index c) const;
687  // |||-|||
689  Index v, Index s, const Range& b,
690  Index p, Index r, Index c) const;
691  // ||-||||
693  Index v, const Range& s, Index b,
694  Index p, Index r, Index c) const;
695  // |-|||||
697  const Range& v, Index s, Index b,
698  Index p, Index r, Index c) const;
699  // -||||||
700  ConstVectorView operator()( const Range& l,
701  Index v, Index s, Index b,
702  Index p, Index r, Index c) const;
703 
704  // Result scalar (1 combination)
705  // |||||||
707  Index v, Index s, Index b,
708  Index p, Index r, Index c) const
709  { CHECK(l);
710  CHECK(v);
711  CHECK(s);
712  CHECK(b);
713  CHECK(p);
714  CHECK(r);
715  CHECK(c);
716  return *(mdata + OFFSET(l) +
717  OFFSET(v) + OFFSET(s) + OFFSET(b) +
718  OFFSET(p) + OFFSET(r) + OFFSET(c) );
719  }
720 
721 
722  // Functions returning iterators:
723  ConstIterator7D begin() const;
724  ConstIterator7D end() const;
725 
727  virtual ~ConstTensor7View() {}
728 
729  // Friends:
730  friend class Tensor7View;
731 
732  // Special constructor to make a Tensor7 view of a Tensor6.
734 
735 protected:
736  // Constructors:
739  const Range& l,
740  const Range& v, const Range& s, const Range& b,
741  const Range& p, const Range& r, const Range& c);
743  const Range& pl,
744  const Range& pv, const Range& ps, const Range& pb,
745  const Range& pp, const Range& pr, const Range& pc,
746  const Range& nl,
747  const Range& nv, const Range& ns, const Range& nb,
748  const Range& np, const Range& nr, const Range& nc);
749 
750  // Data members:
751  // -------------
768 };
769 
780 public:
781 
782  // Const index operators:
783 
784  // Result 7D (1 combination)
785  // -------
787  const Range& v, const Range& s, const Range& b,
788  const Range& p, const Range& r, const Range& c) const;
789 
790  // Result 6D (7 combinations)
791  // ------|
793  const Range& v, const Range& s, const Range& b,
794  const Range& p, const Range& r, Index c) const;
795  // -----|-
797  const Range& v, const Range& s, const Range& b,
798  const Range& p, Index r, const Range& c) const;
799  // ----|--
801  const Range& v, const Range& s, const Range& b,
802  Index p, const Range& r, const Range& c) const;
803  // ---|---
805  const Range& v, const Range& s, Index b,
806  const Range& p, const Range& r, const Range& c) const;
807  // --|----
809  const Range& v, Index s, const Range& b,
810  const Range& p, const Range& r, const Range& c) const;
811  // -|-----
813  Index v, const Range& s, const Range& b,
814  const Range& p, const Range& r, const Range& c) const;
815  // |------
817  const Range& v, const Range& s, const Range& b,
818  const Range& p, const Range& r, const Range& c) const;
819 
820  // Result 5D (6+5+4+3+2+1 = 21 combinations)
821  // -----||
823  const Range& v, const Range& s, const Range& b,
824  const Range& p, Index r, Index c) const;
825  // ----|-|
827  const Range& v, const Range& s, const Range& b,
828  Index p, const Range& r, Index c) const;
829  // ---|--|
831  const Range& v, const Range& s, Index b,
832  const Range& p, const Range& r, Index c) const;
833  // --|---|
835  const Range& v, Index s, const Range& b,
836  const Range& p, const Range& r, Index c) const;
837  // -|----|
839  Index v, const Range& s, const Range& b,
840  const Range& p, const Range& r, Index c) const;
841  // |-----|
843  const Range& v, const Range& s, const Range& b,
844  const Range& p, const Range& r, Index c) const;
845  // ----||-
847  const Range& v, const Range& s, const Range& b,
848  Index p, Index r, const Range& c) const;
849  // ---|-|-
851  const Range& v, const Range& s, Index b,
852  const Range& p, Index r, const Range& c) const;
853  // --|--|-
855  const Range& v, Index s, const Range& b,
856  const Range& p, Index r, const Range& c) const;
857  // -|---|-
859  Index v, const Range& s, const Range& b,
860  const Range& p, Index r, const Range& c) const;
861  // |----|-
863  const Range& v, const Range& s, const Range& b,
864  const Range& p, Index r, const Range& c) const;
865  // ---||--
867  const Range& v, const Range& s, Index b,
868  Index p, const Range& r, const Range& c) const;
869  // --|-|--
871  const Range& v, Index s, const Range& b,
872  Index p, const Range& r, const Range& c) const;
873  // -|--|--
875  Index v, const Range& s, const Range& b,
876  Index p, const Range& r, const Range& c) const;
877  // |---|--
879  const Range& v, const Range& s, const Range& b,
880  Index p, const Range& r, const Range& c) const;
881  // --||---
883  const Range& v, Index s, Index b,
884  const Range& p, const Range& r, const Range& c) const;
885  // -|-|---
887  Index v, const Range& s, Index b,
888  const Range& p, const Range& r, const Range& c) const;
889  // |--|---
891  const Range& v, const Range& s, Index b,
892  const Range& p, const Range& r, const Range& c) const;
893  // -||----
895  Index v, Index s, const Range& b,
896  const Range& p, const Range& r, const Range& c) const;
897  // |-|----
899  const Range& v, Index s, const Range& b,
900  const Range& p, const Range& r, const Range& c) const;
901  // ||-----
903  Index v, const Range& s, const Range& b,
904  const Range& p, const Range& r, const Range& c) const;
905 
906  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
907  // ----|||
909  const Range& v, const Range& s, const Range& b,
910  Index p, Index r, Index c) const;
911  // ---|-||
913  const Range& v, const Range& s, Index b,
914  const Range& p, Index r, Index c) const;
915  // --|--||
917  const Range& v, Index s, const Range& b,
918  const Range& p, Index r, Index c) const;
919  // -|---||
921  Index v, const Range& s, const Range& b,
922  const Range& p, Index r, Index c) const;
923  // |----||
925  const Range& v, const Range& s, const Range& b,
926  const Range& p, Index r, Index c) const;
927  // ---||-|
929  const Range& v, const Range& s, Index b,
930  Index p, const Range& r, Index c) const;
931  // --|-|-|
933  const Range& v, Index s, const Range& b,
934  Index p, const Range& r, Index c) const;
935  // -|--|-|
937  Index v, const Range& s, const Range& b,
938  Index p, const Range& r, Index c) const;
939  // |---|-|
941  const Range& v, const Range& s, const Range& b,
942  Index p, const Range& r, Index c) const;
943  // --||--|
945  const Range& v, Index s, Index b,
946  const Range& p, const Range& r, Index c) const;
947  // -|-|--|
949  Index v, const Range& s, Index b,
950  const Range& p, const Range& r, Index c) const;
951  // |--|--|
953  const Range& v, const Range& s, Index b,
954  const Range& p, const Range& r, Index c) const;
955  // -||---|
957  Index v, Index s, const Range& b,
958  const Range& p, const Range& r, Index c) const;
959  // |-|---|
961  const Range& v, Index s, const Range& b,
962  const Range& p, const Range& r, Index c) const;
963  // ||----|
965  Index v, const Range& s, const Range& b,
966  const Range& p, const Range& r, Index c) const;
967  // ---|||-
969  const Range& v, const Range& s, Index b,
970  Index p, Index r, const Range& c) const;
971  // --|-||-
973  const Range& v, Index s, const Range& b,
974  Index p, Index r, const Range& c) const;
975  // -|--||-
977  Index v, const Range& s, const Range& b,
978  Index p, Index r, const Range& c) const;
979  // |---||-
981  const Range& v, const Range& s, const Range& b,
982  Index p, Index r, const Range& c) const;
983  // --||-|-
985  const Range& v, Index s, Index b,
986  const Range& p, Index r, const Range& c) const;
987  // -|-|-|-
989  Index v, const Range& s, Index b,
990  const Range& p, Index r, const Range& c) const;
991  // |--|-|-
993  const Range& v, const Range& s, Index b,
994  const Range& p, Index r, const Range& c) const;
995  // -||--|-
997  Index v, Index s, const Range& b,
998  const Range& p, Index r, const Range& c) const;
999  // |-|--|-
1001  const Range& v, Index s, const Range& b,
1002  const Range& p, Index r, const Range& c) const;
1003  // ||---|-
1005  Index v, const Range& s, const Range& b,
1006  const Range& p, Index r, const Range& c) const;
1007  // --|||--
1008  ConstTensor4View operator()( const Range& l,
1009  const Range& v, Index s, Index b,
1010  Index p, const Range& r, const Range& c) const;
1011  // -|-||--
1012  ConstTensor4View operator()( const Range& l,
1013  Index v, const Range& s, Index b,
1014  Index p, const Range& r, const Range& c) const;
1015  // |--||--
1017  const Range& v, const Range& s, Index b,
1018  Index p, const Range& r, const Range& c) const;
1019  // -||-|--
1020  ConstTensor4View operator()( const Range& l,
1021  Index v, Index s, const Range& b,
1022  Index p, const Range& r, const Range& c) const;
1023  // |-|-|--
1025  const Range& v, Index s, const Range& b,
1026  Index p, const Range& r, const Range& c) const;
1027  // ||--|--
1029  Index v, const Range& s, const Range& b,
1030  Index p, const Range& r, const Range& c) const;
1031  // -|||---
1032  ConstTensor4View operator()( const Range& l,
1033  Index v, Index s, Index b,
1034  const Range& p, const Range& r, const Range& c) const;
1035  // |-||---
1037  const Range& v, Index s, Index b,
1038  const Range& p, const Range& r, const Range& c) const;
1039  // ||-|---
1041  Index v, const Range& s, Index b,
1042  const Range& p, const Range& r, const Range& c) const;
1043  // |||----
1045  Index v, Index s, const Range& b,
1046  const Range& p, const Range& r, const Range& c) const;
1047 
1048  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1049  // ||||---
1051  Index v, Index s, Index b,
1052  const Range& p, const Range& r, const Range& c) const;
1053  // |||-|--
1055  Index v, Index s, const Range& b,
1056  Index p, const Range& r, const Range& c) const;
1057  // ||-||--
1059  Index v, const Range& s, Index b,
1060  Index p, const Range& r, const Range& c) const;
1061  // |-|||--
1063  const Range& v, Index s, Index b,
1064  Index p, const Range& r, const Range& c) const;
1065  // -||||--
1066  ConstTensor3View operator()( const Range& l,
1067  Index v, Index s, Index b,
1068  Index p, const Range& r, const Range& c) const;
1069  // |||--|-
1071  Index v, Index s, const Range& b,
1072  const Range& p, Index r, const Range& c) const;
1073  // ||-|-|-
1075  Index v, const Range& s, Index b,
1076  const Range& p, Index r, const Range& c) const;
1077  // |-||-|-
1079  const Range& v, Index s, Index b,
1080  const Range& p, Index r, const Range& c) const;
1081  // -|||-|-
1082  ConstTensor3View operator()( const Range& l,
1083  Index v, Index s, Index b,
1084  const Range& p, Index r, const Range& c) const;
1085  // ||--||-
1087  Index v, const Range& s, const Range& b,
1088  Index p, Index r, const Range& c) const;
1089  // |-|-||-
1091  const Range& v, Index s, const Range& b,
1092  Index p, Index r, const Range& c) const;
1093  // -||-||-
1094  ConstTensor3View operator()( const Range& l,
1095  Index v, Index s, const Range& b,
1096  Index p, Index r, const Range& c) const;
1097  // |--|||-
1099  const Range& v, const Range& s, Index b,
1100  Index p, Index r, const Range& c) const;
1101  // -|-|||-
1102  ConstTensor3View operator()( const Range& l,
1103  Index v, const Range& s, Index b,
1104  Index p, Index r, const Range& c) const;
1105  // --||||-
1106  ConstTensor3View operator()( const Range& l,
1107  const Range& v, Index s, Index b,
1108  Index p, Index r, const Range& c) const;
1109  // |||---|
1111  Index v, Index s, const Range& b,
1112  const Range& p, const Range& r, Index c) const;
1113  // ||-|--|
1115  Index v, const Range& s, Index b,
1116  const Range& p, const Range& r, Index c) const;
1117  // |-||--|
1119  const Range& v, Index s, Index b,
1120  const Range& p, const Range& r, Index c) const;
1121  // -|||--|
1122  ConstTensor3View operator()( const Range& l,
1123  Index v, Index s, Index b,
1124  const Range& p, const Range& r, Index c) const;
1125  // ||--|-|
1127  Index v, const Range& s, const Range& b,
1128  Index p, const Range& r, Index c) const;
1129  // |-|-|-|
1131  const Range& v, Index s, const Range& b,
1132  Index p, const Range& r, Index c) const;
1133  // -||-|-|
1134  ConstTensor3View operator()( const Range& l,
1135  Index v, Index s, const Range& b,
1136  Index p, const Range& r, Index c) const;
1137  // |--||-|
1139  const Range& v, const Range& s, Index b,
1140  Index p, const Range& r, Index c) const;
1141  // -|-||-|
1142  ConstTensor3View operator()( const Range& l,
1143  Index v, const Range& s, Index b,
1144  Index p, const Range& r, Index c) const;
1145  // --|||-|
1146  ConstTensor3View operator()( const Range& l,
1147  const Range& v, Index s, Index b,
1148  Index p, const Range& r, Index c) const;
1149  // ||---||
1151  Index v, const Range& s, const Range& b,
1152  const Range& p, Index r, Index c) const;
1153  // |-|--||
1155  const Range& v, Index s, const Range& b,
1156  const Range& p, Index r, Index c) const;
1157  // -||--||
1158  ConstTensor3View operator()( const Range& l,
1159  Index v, Index s, const Range& b,
1160  const Range& p, Index r, Index c) const;
1161  // |--|-||
1163  const Range& v, const Range& s, Index b,
1164  const Range& p, Index r, Index c) const;
1165  // -|-|-||
1166  ConstTensor3View operator()( const Range& l,
1167  Index v, const Range& s, Index b,
1168  const Range& p, Index r, Index c) const;
1169  // --||-||
1170  ConstTensor3View operator()( const Range& l,
1171  const Range& v, Index s, Index b,
1172  const Range& p, Index r, Index c) const;
1173  // |---|||
1175  const Range& v, const Range& s, const Range& b,
1176  Index p, Index r, Index c) const;
1177  // -|--|||
1178  ConstTensor3View operator()( const Range& l,
1179  Index v, const Range& s, const Range& b,
1180  Index p, Index r, Index c) const;
1181  // --|-|||
1182  ConstTensor3View operator()( const Range& l,
1183  const Range& v, Index s, const Range& b,
1184  Index p, Index r, Index c) const;
1185  // ---||||
1186  ConstTensor3View operator()( const Range& l,
1187  const Range& v, const Range& s, Index b,
1188  Index p, Index r, Index c) const;
1189 
1190  // Result 2D (6+5+4+3+2+1 = 21 combinations)
1191  // |||||--
1193  Index v, Index s, Index b,
1194  Index p, const Range& r, const Range& c) const;
1195  // ||||-|-
1197  Index v, Index s, Index b,
1198  const Range& p, Index r, const Range& c) const;
1199  // |||-||-
1201  Index v, Index s, const Range& b,
1202  Index p, Index r, const Range& c) const;
1203  // ||-|||-
1205  Index v, const Range& s, Index b,
1206  Index p, Index r, const Range& c) const;
1207  // |-||||-
1209  const Range& v, Index s, Index b,
1210  Index p, Index r, const Range& c) const;
1211  // -|||||-
1212  ConstMatrixView operator()( const Range& l,
1213  Index v, Index s, Index b,
1214  Index p, Index r, const Range& c) const;
1215  // ||||--|
1217  Index v, Index s, Index b,
1218  const Range& p, const Range& r, Index c) const;
1219  // |||-|-|
1221  Index v, Index s, const Range& b,
1222  Index p, const Range& r, Index c) const;
1223  // ||-||-|
1225  Index v, const Range& s, Index b,
1226  Index p, const Range& r, Index c) const;
1227  // |-|||-|
1229  const Range& v, Index s, Index b,
1230  Index p, const Range& r, Index c) const;
1231  // -||||-|
1232  ConstMatrixView operator()( const Range& l,
1233  Index v, Index s, Index b,
1234  Index p, const Range& r, Index c) const;
1235  // |||--||
1237  Index v, Index s, const Range& b,
1238  const Range& p, Index r, Index c) const;
1239  // ||-|-||
1241  Index v, const Range& s, Index b,
1242  const Range& p, Index r, Index c) const;
1243  // |-||-||
1245  const Range& v, Index s, Index b,
1246  const Range& p, Index r, Index c) const;
1247  // -|||-||
1248  ConstMatrixView operator()( const Range& l,
1249  Index v, Index s, Index b,
1250  const Range& p, Index r, Index c) const;
1251  // ||--|||
1253  Index v, const Range& s, const Range& b,
1254  Index p, Index r, Index c) const;
1255  // |-|-|||
1257  const Range& v, Index s, const Range& b,
1258  Index p, Index r, Index c) const;
1259  // -||-|||
1260  ConstMatrixView operator()( const Range& l,
1261  Index v, Index s, const Range& b,
1262  Index p, Index r, Index c) const;
1263  // |--||||
1265  const Range& v, const Range& s, Index b,
1266  Index p, Index r, Index c) const;
1267  // -|-||||
1268  ConstMatrixView operator()( const Range& l,
1269  Index v, const Range& s, Index b,
1270  Index p, Index r, Index c) const;
1271  // --|||||
1272  ConstMatrixView operator()( const Range& l,
1273  const Range& v, Index s, Index b,
1274  Index p, Index r, Index c) const;
1275 
1276  // Result 1D (7 combinations)
1277  // ||||||-
1279  Index v, Index s, Index b,
1280  Index p, Index r, const Range& c) const;
1281  // |||||-|
1283  Index v, Index s, Index b,
1284  Index p, const Range& r, Index c) const;
1285  // ||||-||
1287  Index v, Index s, Index b,
1288  const Range& p, Index r, Index c) const;
1289  // |||-|||
1291  Index v, Index s, const Range& b,
1292  Index p, Index r, Index c) const;
1293  // ||-||||
1295  Index v, const Range& s, Index b,
1296  Index p, Index r, Index c) const;
1297  // |-|||||
1299  const Range& v, Index s, Index b,
1300  Index p, Index r, Index c) const;
1301  // -||||||
1302  ConstVectorView operator()( const Range& l,
1303  Index v, Index s, Index b,
1304  Index p, Index r, Index c) const;
1305 
1306  // Result scalar (1 combination)
1307  // |||||||
1309  Index v, Index s, Index b,
1310  Index p, Index r, Index c) const
1311  { return ConstTensor7View::operator()(l,v,s,b,p,r,c); }
1312 
1313 
1314  // Non-const index operators:
1315 
1316  // Result 7D (1 combination)
1317  // -------
1318  Tensor7View operator()( const Range& l,
1319  const Range& v, const Range& s, const Range& b,
1320  const Range& p, const Range& r, const Range& c);
1321 
1322  // Result 6D (7 combinations)
1323  // ------|
1324  Tensor6View operator()( const Range& l,
1325  const Range& v, const Range& s, const Range& b,
1326  const Range& p, const Range& r, Index c);
1327  // -----|-
1328  Tensor6View operator()( const Range& l,
1329  const Range& v, const Range& s, const Range& b,
1330  const Range& p, Index r, const Range& c);
1331  // ----|--
1332  Tensor6View operator()( const Range& l,
1333  const Range& v, const Range& s, const Range& b,
1334  Index p, const Range& r, const Range& c);
1335  // ---|---
1336  Tensor6View operator()( const Range& l,
1337  const Range& v, const Range& s, Index b,
1338  const Range& p, const Range& r, const Range& c);
1339  // --|----
1340  Tensor6View operator()( const Range& l,
1341  const Range& v, Index s, const Range& b,
1342  const Range& p, const Range& r, const Range& c);
1343  // -|-----
1344  Tensor6View operator()( const Range& l,
1345  Index v, const Range& s, const Range& b,
1346  const Range& p, const Range& r, const Range& c);
1347  // |------
1349  const Range& v, const Range& s, const Range& b,
1350  const Range& p, const Range& r, const Range& c);
1351 
1352  // Result 5D (6+5+4+3+2+1 = 21 combinations)
1353  // -----||
1354  Tensor5View operator()( const Range& l,
1355  const Range& v, const Range& s, const Range& b,
1356  const Range& p, Index r, Index c);
1357  // ----|-|
1358  Tensor5View operator()( const Range& l,
1359  const Range& v, const Range& s, const Range& b,
1360  Index p, const Range& r, Index c);
1361  // ---|--|
1362  Tensor5View operator()( const Range& l,
1363  const Range& v, const Range& s, Index b,
1364  const Range& p, const Range& r, Index c);
1365  // --|---|
1366  Tensor5View operator()( const Range& l,
1367  const Range& v, Index s, const Range& b,
1368  const Range& p, const Range& r, Index c);
1369  // -|----|
1370  Tensor5View operator()( const Range& l,
1371  Index v, const Range& s, const Range& b,
1372  const Range& p, const Range& r, Index c);
1373  // |-----|
1375  const Range& v, const Range& s, const Range& b,
1376  const Range& p, const Range& r, Index c);
1377  // ----||-
1378  Tensor5View operator()( const Range& l,
1379  const Range& v, const Range& s, const Range& b,
1380  Index p, Index r, const Range& c);
1381  // ---|-|-
1382  Tensor5View operator()( const Range& l,
1383  const Range& v, const Range& s, Index b,
1384  const Range& p, Index r, const Range& c);
1385  // --|--|-
1386  Tensor5View operator()( const Range& l,
1387  const Range& v, Index s, const Range& b,
1388  const Range& p, Index r, const Range& c);
1389  // -|---|-
1390  Tensor5View operator()( const Range& l,
1391  Index v, const Range& s, const Range& b,
1392  const Range& p, Index r, const Range& c);
1393  // |----|-
1395  const Range& v, const Range& s, const Range& b,
1396  const Range& p, Index r, const Range& c);
1397  // ---||--
1398  Tensor5View operator()( const Range& l,
1399  const Range& v, const Range& s, Index b,
1400  Index p, const Range& r, const Range& c);
1401  // --|-|--
1402  Tensor5View operator()( const Range& l,
1403  const Range& v, Index s, const Range& b,
1404  Index p, const Range& r, const Range& c);
1405  // -|--|--
1406  Tensor5View operator()( const Range& l,
1407  Index v, const Range& s, const Range& b,
1408  Index p, const Range& r, const Range& c);
1409  // |---|--
1411  const Range& v, const Range& s, const Range& b,
1412  Index p, const Range& r, const Range& c);
1413  // --||---
1414  Tensor5View operator()( const Range& l,
1415  const Range& v, Index s, Index b,
1416  const Range& p, const Range& r, const Range& c);
1417  // -|-|---
1418  Tensor5View operator()( const Range& l,
1419  Index v, const Range& s, Index b,
1420  const Range& p, const Range& r, const Range& c);
1421  // |--|---
1423  const Range& v, const Range& s, Index b,
1424  const Range& p, const Range& r, const Range& c);
1425  // -||----
1426  Tensor5View operator()( const Range& l,
1427  Index v, Index s, const Range& b,
1428  const Range& p, const Range& r, const Range& c);
1429  // |-|----
1431  const Range& v, Index s, const Range& b,
1432  const Range& p, const Range& r, const Range& c);
1433  // ||-----
1435  Index v, const Range& s, const Range& b,
1436  const Range& p, const Range& r, const Range& c);
1437 
1438  // Result 4D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1439  // ----|||
1440  Tensor4View operator()( const Range& l,
1441  const Range& v, const Range& s, const Range& b,
1442  Index p, Index r, Index c);
1443  // ---|-||
1444  Tensor4View operator()( const Range& l,
1445  const Range& v, const Range& s, Index b,
1446  const Range& p, Index r, Index c);
1447  // --|--||
1448  Tensor4View operator()( const Range& l,
1449  const Range& v, Index s, const Range& b,
1450  const Range& p, Index r, Index c);
1451  // -|---||
1452  Tensor4View operator()( const Range& l,
1453  Index v, const Range& s, const Range& b,
1454  const Range& p, Index r, Index c);
1455  // |----||
1457  const Range& v, const Range& s, const Range& b,
1458  const Range& p, Index r, Index c);
1459  // ---||-|
1460  Tensor4View operator()( const Range& l,
1461  const Range& v, const Range& s, Index b,
1462  Index p, const Range& r, Index c);
1463  // --|-|-|
1464  Tensor4View operator()( const Range& l,
1465  const Range& v, Index s, const Range& b,
1466  Index p, const Range& r, Index c);
1467  // -|--|-|
1468  Tensor4View operator()( const Range& l,
1469  Index v, const Range& s, const Range& b,
1470  Index p, const Range& r, Index c);
1471  // |---|-|
1473  const Range& v, const Range& s, const Range& b,
1474  Index p, const Range& r, Index c);
1475  // --||--|
1476  Tensor4View operator()( const Range& l,
1477  const Range& v, Index s, Index b,
1478  const Range& p, const Range& r, Index c);
1479  // -|-|--|
1480  Tensor4View operator()( const Range& l,
1481  Index v, const Range& s, Index b,
1482  const Range& p, const Range& r, Index c);
1483  // |--|--|
1485  const Range& v, const Range& s, Index b,
1486  const Range& p, const Range& r, Index c);
1487  // -||---|
1488  Tensor4View operator()( const Range& l,
1489  Index v, Index s, const Range& b,
1490  const Range& p, const Range& r, Index c);
1491  // |-|---|
1493  const Range& v, Index s, const Range& b,
1494  const Range& p, const Range& r, Index c);
1495  // ||----|
1497  Index v, const Range& s, const Range& b,
1498  const Range& p, const Range& r, Index c);
1499  // ---|||-
1500  Tensor4View operator()( const Range& l,
1501  const Range& v, const Range& s, Index b,
1502  Index p, Index r, const Range& c);
1503  // --|-||-
1504  Tensor4View operator()( const Range& l,
1505  const Range& v, Index s, const Range& b,
1506  Index p, Index r, const Range& c);
1507  // -|--||-
1508  Tensor4View operator()( const Range& l,
1509  Index v, const Range& s, const Range& b,
1510  Index p, Index r, const Range& c);
1511  // |---||-
1513  const Range& v, const Range& s, const Range& b,
1514  Index p, Index r, const Range& c);
1515  // --||-|-
1516  Tensor4View operator()( const Range& l,
1517  const Range& v, Index s, Index b,
1518  const Range& p, Index r, const Range& c);
1519  // -|-|-|-
1520  Tensor4View operator()( const Range& l,
1521  Index v, const Range& s, Index b,
1522  const Range& p, Index r, const Range& c);
1523  // |--|-|-
1525  const Range& v, const Range& s, Index b,
1526  const Range& p, Index r, const Range& c);
1527  // -||--|-
1528  Tensor4View operator()( const Range& l,
1529  Index v, Index s, const Range& b,
1530  const Range& p, Index r, const Range& c);
1531  // |-|--|-
1533  const Range& v, Index s, const Range& b,
1534  const Range& p, Index r, const Range& c);
1535  // ||---|-
1537  Index v, const Range& s, const Range& b,
1538  const Range& p, Index r, const Range& c);
1539  // --|||--
1540  Tensor4View operator()( const Range& l,
1541  const Range& v, Index s, Index b,
1542  Index p, const Range& r, const Range& c);
1543  // -|-||--
1544  Tensor4View operator()( const Range& l,
1545  Index v, const Range& s, Index b,
1546  Index p, const Range& r, const Range& c);
1547  // |--||--
1549  const Range& v, const Range& s, Index b,
1550  Index p, const Range& r, const Range& c);
1551  // -||-|--
1552  Tensor4View operator()( const Range& l,
1553  Index v, Index s, const Range& b,
1554  Index p, const Range& r, const Range& c);
1555  // |-|-|--
1557  const Range& v, Index s, const Range& b,
1558  Index p, const Range& r, const Range& c);
1559  // ||--|--
1561  Index v, const Range& s, const Range& b,
1562  Index p, const Range& r, const Range& c);
1563  // -|||---
1564  Tensor4View operator()( const Range& l,
1565  Index v, Index s, Index b,
1566  const Range& p, const Range& r, const Range& c);
1567  // |-||---
1569  const Range& v, Index s, Index b,
1570  const Range& p, const Range& r, const Range& c);
1571  // ||-|---
1573  Index v, const Range& s, Index b,
1574  const Range& p, const Range& r, const Range& c);
1575  // |||----
1577  Index v, Index s, const Range& b,
1578  const Range& p, const Range& r, const Range& c);
1579 
1580  // Result 3D (5+4+3+2+1 +4+3+2+1 +3+2+1 +2+1 +1 = 35 combinations)
1581  // ||||---
1583  Index v, Index s, Index b,
1584  const Range& p, const Range& r, const Range& c);
1585  // |||-|--
1587  Index v, Index s, const Range& b,
1588  Index p, const Range& r, const Range& c);
1589  // ||-||--
1591  Index v, const Range& s, Index b,
1592  Index p, const Range& r, const Range& c);
1593  // |-|||--
1595  const Range& v, Index s, Index b,
1596  Index p, const Range& r, const Range& c);
1597  // -||||--
1598  Tensor3View operator()( const Range& l,
1599  Index v, Index s, Index b,
1600  Index p, const Range& r, const Range& c);
1601  // |||--|-
1603  Index v, Index s, const Range& b,
1604  const Range& p, Index r, const Range& c);
1605  // ||-|-|-
1607  Index v, const Range& s, Index b,
1608  const Range& p, Index r, const Range& c);
1609  // |-||-|-
1611  const Range& v, Index s, Index b,
1612  const Range& p, Index r, const Range& c);
1613  // -|||-|-
1614  Tensor3View operator()( const Range& l,
1615  Index v, Index s, Index b,
1616  const Range& p, Index r, const Range& c);
1617  // ||--||-
1619  Index v, const Range& s, const Range& b,
1620  Index p, Index r, const Range& c);
1621  // |-|-||-
1623  const Range& v, Index s, const Range& b,
1624  Index p, Index r, const Range& c);
1625  // -||-||-
1626  Tensor3View operator()( const Range& l,
1627  Index v, Index s, const Range& b,
1628  Index p, Index r, const Range& c);
1629  // |--|||-
1631  const Range& v, const Range& s, Index b,
1632  Index p, Index r, const Range& c);
1633  // -|-|||-
1634  Tensor3View operator()( const Range& l,
1635  Index v, const Range& s, Index b,
1636  Index p, Index r, const Range& c);
1637  // --||||-
1638  Tensor3View operator()( const Range& l,
1639  const Range& v, Index s, Index b,
1640  Index p, Index r, const Range& c);
1641  // |||---|
1643  Index v, Index s, const Range& b,
1644  const Range& p, const Range& r, Index c);
1645  // ||-|--|
1647  Index v, const Range& s, Index b,
1648  const Range& p, const Range& r, Index c);
1649  // |-||--|
1651  const Range& v, Index s, Index b,
1652  const Range& p, const Range& r, Index c);
1653  // -|||--|
1654  Tensor3View operator()( const Range& l,
1655  Index v, Index s, Index b,
1656  const Range& p, const Range& r, Index c);
1657  // ||--|-|
1659  Index v, const Range& s, const Range& b,
1660  Index p, const Range& r, Index c);
1661  // |-|-|-|
1663  const Range& v, Index s, const Range& b,
1664  Index p, const Range& r, Index c);
1665  // -||-|-|
1666  Tensor3View operator()( const Range& l,
1667  Index v, Index s, const Range& b,
1668  Index p, const Range& r, Index c);
1669  // |--||-|
1671  const Range& v, const Range& s, Index b,
1672  Index p, const Range& r, Index c);
1673  // -|-||-|
1674  Tensor3View operator()( const Range& l,
1675  Index v, const Range& s, Index b,
1676  Index p, const Range& r, Index c);
1677  // --|||-|
1678  Tensor3View operator()( const Range& l,
1679  const Range& v, Index s, Index b,
1680  Index p, const Range& r, Index c);
1681  // ||---||
1683  Index v, const Range& s, const Range& b,
1684  const Range& p, Index r, Index c);
1685  // |-|--||
1687  const Range& v, Index s, const Range& b,
1688  const Range& p, Index r, Index c);
1689  // -||--||
1690  Tensor3View operator()( const Range& l,
1691  Index v, Index s, const Range& b,
1692  const Range& p, Index r, Index c);
1693  // |--|-||
1695  const Range& v, const Range& s, Index b,
1696  const Range& p, Index r, Index c);
1697  // -|-|-||
1698  Tensor3View operator()( const Range& l,
1699  Index v, const Range& s, Index b,
1700  const Range& p, Index r, Index c);
1701  // --||-||
1702  Tensor3View operator()( const Range& l,
1703  const Range& v, Index s, Index b,
1704  const Range& p, Index r, Index c);
1705  // |---|||
1707  const Range& v, const Range& s, const Range& b,
1708  Index p, Index r, Index c);
1709  // -|--|||
1710  Tensor3View operator()( const Range& l,
1711  Index v, const Range& s, const Range& b,
1712  Index p, Index r, Index c);
1713  // --|-|||
1714  Tensor3View operator()( const Range& l,
1715  const Range& v, Index s, const Range& b,
1716  Index p, Index r, Index c);
1717  // ---||||
1718  Tensor3View operator()( const Range& l,
1719  const Range& v, const Range& s, Index b,
1720  Index p, Index r, Index c);
1721 
1722  // Result 2D (6+5+4+3+2+1 = 21 combinations)
1723  // |||||--
1725  Index v, Index s, Index b,
1726  Index p, const Range& r, const Range& c);
1727  // ||||-|-
1729  Index v, Index s, Index b,
1730  const Range& p, Index r, const Range& c);
1731  // |||-||-
1733  Index v, Index s, const Range& b,
1734  Index p, Index r, const Range& c);
1735  // ||-|||-
1737  Index v, const Range& s, Index b,
1738  Index p, Index r, const Range& c);
1739  // |-||||-
1741  const Range& v, Index s, Index b,
1742  Index p, Index r, const Range& c);
1743  // -|||||-
1744  MatrixView operator()( const Range& l,
1745  Index v, Index s, Index b,
1746  Index p, Index r, const Range& c);
1747  // ||||--|
1749  Index v, Index s, Index b,
1750  const Range& p, const Range& r, Index c);
1751  // |||-|-|
1753  Index v, Index s, const Range& b,
1754  Index p, const Range& r, Index c);
1755  // ||-||-|
1757  Index v, const Range& s, Index b,
1758  Index p, const Range& r, Index c);
1759  // |-|||-|
1761  const Range& v, Index s, Index b,
1762  Index p, const Range& r, Index c);
1763  // -||||-|
1764  MatrixView operator()( const Range& l,
1765  Index v, Index s, Index b,
1766  Index p, const Range& r, Index c);
1767  // |||--||
1769  Index v, Index s, const Range& b,
1770  const Range& p, Index r, Index c);
1771  // ||-|-||
1773  Index v, const Range& s, Index b,
1774  const Range& p, Index r, Index c);
1775  // |-||-||
1777  const Range& v, Index s, Index b,
1778  const Range& p, Index r, Index c);
1779  // -|||-||
1780  MatrixView operator()( const Range& l,
1781  Index v, Index s, Index b,
1782  const Range& p, Index r, Index c);
1783  // ||--|||
1785  Index v, const Range& s, const Range& b,
1786  Index p, Index r, Index c);
1787  // |-|-|||
1789  const Range& v, Index s, const Range& b,
1790  Index p, Index r, Index c);
1791  // -||-|||
1792  MatrixView operator()( const Range& l,
1793  Index v, Index s, const Range& b,
1794  Index p, Index r, Index c);
1795  // |--||||
1797  const Range& v, const Range& s, Index b,
1798  Index p, Index r, Index c);
1799  // -|-||||
1800  MatrixView operator()( const Range& l,
1801  Index v, const Range& s, Index b,
1802  Index p, Index r, Index c);
1803  // --|||||
1804  MatrixView operator()( const Range& l,
1805  const Range& v, Index s, Index b,
1806  Index p, Index r, Index c);
1807 
1808  // Result 1D (7 combinations)
1809  // ||||||-
1811  Index v, Index s, Index b,
1812  Index p, Index r, const Range& c);
1813  // |||||-|
1815  Index v, Index s, Index b,
1816  Index p, const Range& r, Index c);
1817  // ||||-||
1819  Index v, Index s, Index b,
1820  const Range& p, Index r, Index c);
1821  // |||-|||
1823  Index v, Index s, const Range& b,
1824  Index p, Index r, Index c);
1825  // ||-||||
1827  Index v, const Range& s, Index b,
1828  Index p, Index r, Index c);
1829  // |-|||||
1831  const Range& v, Index s, Index b,
1832  Index p, Index r, Index c);
1833  // -||||||
1834  VectorView operator()( const Range& l,
1835  Index v, Index s, Index b,
1836  Index p, Index r, Index c);
1837 
1838  // Result scalar (1 combination)
1839  // |||||||
1841  Index v, Index s, Index b,
1842  Index p, Index r, Index c)
1843  { CHECK(l);
1844  CHECK(v);
1845  CHECK(s);
1846  CHECK(b);
1847  CHECK(p);
1848  CHECK(r);
1849  CHECK(c);
1850  return *(mdata + OFFSET(l) +
1851  OFFSET(v) + OFFSET(s) + OFFSET(b) +
1852  OFFSET(p) + OFFSET(r) + OFFSET(c) );
1853  }
1854 
1855 
1856  // Functions returning const iterators:
1857  ConstIterator7D begin() const;
1858  ConstIterator7D end() const;
1859  // Functions returning iterators:
1860  Iterator7D begin();
1861  Iterator7D end();
1862 
1863  // Assignment operators:
1865  Tensor7View& operator=(const Tensor7View& v);
1866  Tensor7View& operator=(const Tensor7& v);
1868 
1869  // Other operators:
1874 
1879 
1881  virtual ~Tensor7View() {}
1882 
1883  // Friends:
1884 
1885  // Special constructor to make a Tensor7 view of a Tensor6.
1886  Tensor7View(const Tensor6View& a);
1887 
1888 protected:
1889  // Constructors:
1890  Tensor7View();
1891  Tensor7View(Numeric *data,
1892  const Range& l,
1893  const Range& v, const Range& s, const Range& b,
1894  const Range& p, const Range& r, const Range& c);
1895  Tensor7View(Numeric *data,
1896  const Range& pl,
1897  const Range& pv, const Range& ps, const Range& pb,
1898  const Range& pp, const Range& pr, const Range& pc,
1899  const Range& nl,
1900  const Range& nv, const Range& ns, const Range& nb,
1901  const Range& np, const Range& nr, const Range& nc);
1902 };
1903 
1912 class Tensor7 : public Tensor7View {
1913 public:
1914  // Constructors:
1915  Tensor7();
1916  Tensor7(Index l,
1917  Index v, Index s, Index b,
1918  Index p, Index r, Index c);
1919  Tensor7(Index l,
1920  Index v, Index s, Index b,
1921  Index p, Index r, Index c,
1922  Numeric fill);
1923  Tensor7(const ConstTensor7View& v);
1924  Tensor7(const Tensor7& v);
1925 
1926  // Assignment operators:
1927  Tensor7& operator=(const Tensor7& x);
1929 
1930  // Resize function:
1931  void resize(Index l,
1932  Index v, Index s, Index b,
1933  Index p, Index r, Index c);
1934 
1935  // Destructor:
1936  virtual ~Tensor7();
1937 };
1938 
1939 
1940 // Function declarations:
1941 // ----------------------
1942 
1943 void copy(ConstIterator7D origin,
1944  const ConstIterator7D& end,
1945  Iterator7D target);
1946 
1947 void copy(Numeric x,
1948  Iterator7D target,
1949  const Iterator7D& end);
1950 
1951 void transform( Tensor7View y,
1952  double (&my_func)(double),
1953  ConstTensor7View x );
1954 
1955 Numeric max(const ConstTensor7View& x);
1956 
1957 Numeric min(const ConstTensor7View& x);
1958 
1959 ostream& operator<<(ostream& os, const ConstTensor7View& v);
1960 
1962 // Helper function for debugging
1963 #ifndef NDEBUG
1964 
1966  Index b, Index p, Index r, Index c);
1967 
1968 #endif
1969 
1971 #endif // matpackVII_h
ConstIterator7D
Const version of Iterator7D.
Definition: matpackVII.h:93
Tensor7View
The Tensor7View class.
Definition: matpackVII.h:779
ConstTensor7View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVII.cc:43
MatrixView
The MatrixView class.
Definition: matpackI.h:668
Tensor7View::end
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVII.cc:4864
min
Numeric min(const ConstTensor7View &x)
Min function, tensor version.
Definition: matpackVII.cc:5466
ConstTensor6View::mvr
Range mvr
The vitrine range of mdata that is actually used.
Definition: matpackVI.h:426
ConstTensor7View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVII.h:757
operator<<
ostream & operator<<(ostream &os, const ConstTensor7View &v)
Output operator.
Definition: matpackVII.cc:1970
ConstTensor6View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackVI.h:430
ConstTensor7View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVII.cc:67
ConstTensor7View
A constant view of a Tensor7.
Definition: matpackVII.h:169
Tensor7View::operator-=
Tensor7View & operator-=(Numeric x)
Subtraction of scalar.
Definition: matpackVII.cc:4998
ConstTensor7View::mrr
Range mrr
The row range of mdata that is actually used.
Definition: matpackVII.h:763
ConstTensor7View::mlr
Range mlr
The library range of mdata that is actually used.
Definition: matpackVII.h:753
OFFSET
#define OFFSET(x)
Definition: matpackVI.h:34
ConstIterator7D::operator*
const ConstTensor6View & operator*() const
Dereferencing.
Definition: matpackVII.h:142
Iterator7D
Implementation of Tensors of Rank 7.
Definition: matpackVII.h:35
Iterator7D::operator!=
bool operator!=(const Iterator7D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackVII.h:57
Iterator7D::mstride
Index mstride
Stride.
Definition: matpackVII.h:89
ConstTensor7View::begin
ConstIterator7D begin() const
Return const iterator to first sub-tensor.
Definition: matpackVII.cc:1852
Range::mstart
Index mstart
The start index.
Definition: matpackI.h:204
Tensor7View::operator+=
Tensor7View & operator+=(Numeric x)
Addition of scalar.
Definition: matpackVII.cc:4987
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:434
Tensor7::~Tensor7
virtual ~Tensor7()
Destructor for Tensor7.
Definition: matpackVII.cc:5396
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:5510
ConstIterator7D::mstride
Index mstride
Stride.
Definition: matpackVII.h:148
ConstIterator7D::operator!=
bool operator!=(const ConstIterator7D &other) const
Not equal operator, needed for algorithms like copy.
Definition: matpackVII.h:116
ConstTensor7View::nlibraries
Index nlibraries() const
Returns the number of libraries.
Definition: matpackVII.cc:31
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:149
Tensor3View
The Tensor3View class.
Definition: matpackIII.h:234
ConstIterator7D::operator++
ConstIterator7D & operator++()
Prefix increment operator.
Definition: matpackVII.h:110
ConstTensor6View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackVI.h:438
Iterator7D::msv
Tensor6View msv
Current position.
Definition: matpackVII.h:87
Tensor7::resize
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVII.cc:5341
ConstTensor6View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackVI.h:432
Tensor7View::Tensor7View
Tensor7View()
Default constructor.
Definition: matpackVII.cc:5110
Tensor7View::begin
ConstIterator7D begin() const
Return iterator to sub-tensor.
Definition: matpackVII.cc:4858
VectorView
The VectorView class.
Definition: matpackI.h:373
Iterator7D::operator++
Iterator7D & operator++()
Prefix increment operator.
Definition: matpackVII.h:51
Tensor7View::operator=
Tensor7View & operator=(const ConstTensor7View &v)
Assignment operator.
Definition: matpackVII.cc:4900
ConstTensor7View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVII.cc:37
ConstTensor6View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVI.h:428
ns
#define ns
Definition: continua.cc:14564
max
Numeric max(const ConstTensor7View &x)
Max function, tensor version.
Definition: matpackVII.cc:5444
ConstTensor7View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVII.cc:55
ConstTensor6View
A constant view of a Tensor6.
Definition: matpackVI.h:167
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Tensor5View
The Tensor5View class.
Definition: matpackV.h:278
Iterator7D::Iterator7D
Iterator7D(const Tensor6View &x, Index stride)
Explicit constructor.
Definition: matpackVII.h:46
ConstTensor7View::end
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVII.cc:1865
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:1999
ConstTensor7View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackVII.h:761
Iterator7D::operator*
Tensor6View & operator*()
Dereferencing.
Definition: matpackVII.h:83
ConstTensor7View::mvr
Range mvr
The vitrine range of mdata that is actually used.
Definition: matpackVII.h:755
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:591
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:76
Tensor7View::operator/=
Tensor7View & operator/=(Numeric x)
Division by scalar.
Definition: matpackVII.cc:4976
Range
The range class.
Definition: matpackI.h:148
ConstTensor7View::mbr
Range mbr
The book range of mdata that is actually used.
Definition: matpackVII.h:759
Tensor7View::~Tensor7View
virtual ~Tensor7View()
Destructor.
Definition: matpackVII.h:1881
Iterator7D::Iterator7D
Iterator7D(const Iterator7D &o)
Copy constructor.
Definition: matpackVII.h:42
ConstTensor7View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVII.cc:49
Iterator7D::Iterator7D
Iterator7D()
Default constructor.
Definition: matpackVII.h:39
ConstTensor6View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackVI.h:436
Tensor7View::operator*=
Tensor7View & operator*=(Numeric x)
Multiplication by scalar.
Definition: matpackVII.cc:4965
copy
void copy(ConstIterator7D origin, const ConstIterator7D &end, Iterator7D target)
Copy data between begin and end to target.
Definition: matpackVII.cc:5179
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:147
Tensor4View
The Tensor4View class.
Definition: matpackIV.h:245
Tensor7::operator=
Tensor7 & operator=(const Tensor7 &x)
Assignment operator from another tensor.
Definition: matpackVII.cc:5318
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:139
ConstTensor7View::~ConstTensor7View
virtual ~ConstTensor7View()
Destructor.
Definition: matpackVII.h:727
ConstIterator7D::ConstIterator7D
ConstIterator7D(const ConstIterator7D &o)
Copy constructor.
Definition: matpackVII.h:100
ConstIterator7D::ConstIterator7D
ConstIterator7D(const ConstTensor6View &x, Index stride)
Explicit constructor.
Definition: matpackVII.h:104
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
ConstTensor7View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVII.cc:61
ConstTensor7View::ConstTensor7View
ConstTensor7View()
Default constructor.
Definition: matpackVII.cc:1900
ConstIterator7D::msv
ConstTensor6View msv
Current position.
Definition: matpackVII.h:146
Tensor7::Tensor7
Tensor7()
Default constructor.
Definition: matpackVII.cc:5211
Iterator7D::operator->
Tensor6View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Definition: matpackVII.h:80
ConstTensor7View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackVII.h:765
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
ConstIterator7D::ConstIterator7D
ConstIterator7D()
Default constructor.
Definition: matpackVII.h:97
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:5419
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:160
Tensor7
The Tensor7 class.
Definition: matpackVII.h:1912
Tensor6View
The Tensor6View class.
Definition: matpackVI.h:450
ConstTensor7View::mdata
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackVII.h:767