ARTS  2.0.49
matpackVII.cc
Go to the documentation of this file.
1 /* Copyright (C) 2002-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 
25 #include "matpackVII.h"
26 
27 // Functions for ConstTensor7View:
28 // ------------------------------
29 
32 {
33  return mlr.mextent;
34 }
35 
38 {
39  return mvr.mextent;
40 }
41 
44 {
45  return msr.mextent;
46 }
47 
50 {
51  return mbr.mextent;
52 }
53 
56 {
57  return mpr.mextent;
58 }
59 
62 {
63  return mrr.mextent;
64 }
65 
68 {
69  return mcr.mextent;
70 }
71 
72 // Const index operators:
73 
74 // -------
75 ConstTensor7View ConstTensor7View::operator()
76  ( const Range& l,
77  const Range& v, const Range& s, const Range& b,
78  const Range& p, const Range& r, const Range& c) const
79 {
80  return ConstTensor7View(mdata,
81  mlr, mvr, msr, mbr, mpr, mrr, mcr,
82  l, v, s, b, p, r, c);
83 }
84 // |------
85 ConstTensor6View ConstTensor7View::operator()
86  ( Index l,
87  const Range& v, const Range& s, const Range& b,
88  const Range& p, const Range& r, const Range& c) const
89 {
90  CHECK(l);
91  return ConstTensor6View(mdata + OFFSET(l),
92  mvr, msr, mbr, mpr, mrr, mcr,
93  v, s, b, p, r, c);
94 }
95 
96 // ------|
97 ConstTensor6View ConstTensor7View::operator()
98  ( const Range& l,
99  const Range& v, const Range& s, const Range& b,
100  const Range& p, const Range& r, Index c) const
101 {
102  CHECK(c);
103  return ConstTensor6View(mdata + OFFSET(c),
104  mlr, mvr, msr, mbr, mpr, mrr,
105  l, v, s, b, p, r);
106 }
107 // |-----|
108 ConstTensor5View ConstTensor7View::operator()
109  ( Index l,
110  const Range& v, const Range& s, const Range& b,
111  const Range& p, const Range& r, Index c) const
112 {
113  CHECK(l);
114  CHECK(c);
115  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(c),
116  mvr, msr, mbr, mpr, mrr,
117  v, s, b, p, r);
118 }
119 
120 // -----|-
121 ConstTensor6View ConstTensor7View::operator()
122  ( const Range& l,
123  const Range& v, const Range& s, const Range& b,
124  const Range& p, Index r, const Range& c) const
125 {
126  CHECK(r);
127  return ConstTensor6View(mdata + OFFSET(r),
128  mlr, mvr, msr, mbr, mpr, mcr,
129  l, v, s, b, p, c);
130 }
131 // |----|-
132 ConstTensor5View ConstTensor7View::operator()
133  ( Index l,
134  const Range& v, const Range& s, const Range& b,
135  const Range& p, Index r, const Range& c) const
136 {
137  CHECK(l);
138  CHECK(r);
139  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(r),
140  mvr, msr, mbr, mpr, mcr,
141  v, s, b, p, c);
142 }
143 
144 // ----|--
145 ConstTensor6View ConstTensor7View::operator()
146  ( const Range& l,
147  const Range& v, const Range& s, const Range& b,
148  Index p, const Range& r, const Range& c) const
149 {
150  CHECK(p);
151  return ConstTensor6View(mdata + OFFSET(p),
152  mlr, mvr, msr, mbr, mrr, mcr,
153  l, v, s, b, r, c);
154 }
155 // |---|--
156 ConstTensor5View ConstTensor7View::operator()
157  ( Index l,
158  const Range& v, const Range& s, const Range& b,
159  Index p, const Range& r, const Range& c) const
160 {
161  CHECK(l);
162  CHECK(p);
163  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(p),
164  mvr, msr, mbr, mrr, mcr,
165  v, s, b, r, c);
166 }
167 
168 // ---|---
169 ConstTensor6View ConstTensor7View::operator()
170  ( const Range& l,
171  const Range& v, const Range& s, Index b,
172  const Range& p, const Range& r, const Range& c) const
173 {
174  CHECK(b);
175  return ConstTensor6View(mdata + OFFSET(b),
176  mlr, mvr, msr, mpr, mrr, mcr,
177  l, v, s, p, r, c);
178 }
179 // |--|---
180 ConstTensor5View ConstTensor7View::operator()
181  ( Index l,
182  const Range& v, const Range& s, Index b,
183  const Range& p, const Range& r, const Range& c) const
184 {
185  CHECK(l);
186  CHECK(b);
187  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(b),
188  mvr, msr, mpr, mrr, mcr,
189  v, s, p, r, c);
190 }
191 
192 // --|----
193 ConstTensor6View ConstTensor7View::operator()
194  ( const Range& l,
195  const Range& v, Index s, const Range& b,
196  const Range& p, const Range& r, const Range& c) const
197 {
198  CHECK(s);
199  return ConstTensor6View(mdata + OFFSET(s),
200  mlr, mvr, mbr, mpr, mrr, mcr,
201  l, v, b, p, r, c);
202 }
203 // |-|----
204 ConstTensor5View ConstTensor7View::operator()
205  ( Index l,
206  const Range& v, Index s, const Range& b,
207  const Range& p, const Range& r, const Range& c) const
208 {
209  CHECK(l);
210  CHECK(s);
211  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(s),
212  mvr, mbr, mpr, mrr, mcr,
213  v, b, p, r, c);
214 }
215 
216 // -|-----
217 ConstTensor6View ConstTensor7View::operator()
218  ( const Range& l,
219  Index v, const Range& s, const Range& b,
220  const Range& p, const Range& r, const Range& c) const
221 {
222  CHECK(v);
223  return ConstTensor6View(mdata + OFFSET(v),
224  mlr, msr, mbr, mpr, mrr, mcr,
225  l, s, b, p, r, c);
226 }
227 // ||-----
228 ConstTensor5View ConstTensor7View::operator()
229  ( Index l,
230  Index v, const Range& s, const Range& b,
231  const Range& p, const Range& r, const Range& c) const
232 {
233  CHECK(l);
234  CHECK(v);
235  return ConstTensor5View(mdata + OFFSET(l) + OFFSET(v),
236  msr, mbr, mpr, mrr, mcr,
237  s, b, p, r, c);
238 }
239 
240 // -----||
241 ConstTensor5View ConstTensor7View::operator()
242  ( const Range& l,
243  const Range& v, const Range& s, const Range& b,
244  const Range& p, Index r, Index c) const
245 {
246  CHECK(r);
247  CHECK(c);
248  return ConstTensor5View(mdata + OFFSET(r) + OFFSET(c),
249  mlr, mvr, msr, mbr, mpr,
250  l, v, s, b, p );
251 }
252 // |----||
253 ConstTensor4View ConstTensor7View::operator()
254  ( Index l,
255  const Range& v, const Range& s, const Range& b,
256  const Range& p, Index r, Index c) const
257 {
258  CHECK(l);
259  CHECK(r);
260  CHECK(c);
261  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(r) + OFFSET(c),
262  mvr, msr, mbr, mpr,
263  v, s, b, p );
264 }
265 
266 // ----|-|
267 ConstTensor5View ConstTensor7View::operator()
268  ( const Range& l,
269  const Range& v, const Range& s, const Range& b,
270  Index p, const Range& r, Index c) const
271 {
272  CHECK(p);
273  CHECK(c);
274  return ConstTensor5View(mdata + OFFSET(p) + OFFSET(c),
275  mlr, mvr, msr, mbr, mrr,
276  l, v, s, b, r );
277 }
278 // |---|-|
279 ConstTensor4View ConstTensor7View::operator()
280  ( Index l,
281  const Range& v, const Range& s, const Range& b,
282  Index p, const Range& r, Index c) const
283 {
284  CHECK(l);
285  CHECK(p);
286  CHECK(c);
287  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(c),
288  mvr, msr, mbr, mrr,
289  v, s, b, r );
290 }
291 
292 // ---|--|
293 ConstTensor5View ConstTensor7View::operator()
294  ( const Range& l,
295  const Range& v, const Range& s, Index b,
296  const Range& p, const Range& r, Index c) const
297 {
298  CHECK(b);
299  CHECK(c);
300  return ConstTensor5View(mdata + OFFSET(b) + OFFSET(c),
301  mlr, mvr, msr, mpr, mrr,
302  l, v, s, p, r );
303 }
304 // |--|--|
305 ConstTensor4View ConstTensor7View::operator()
306  ( Index l,
307  const Range& v, const Range& s, Index b,
308  const Range& p, const Range& r, Index c) const
309 {
310  CHECK(l);
311  CHECK(b);
312  CHECK(c);
313  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(c),
314  mvr, msr, mpr, mrr,
315  v, s, p, r );
316 }
317 
318 // --|---|
319 ConstTensor5View ConstTensor7View::operator()
320  ( const Range& l,
321  const Range& v, Index s, const Range& b,
322  const Range& p, const Range& r, Index c) const
323 {
324  CHECK(s);
325  CHECK(c);
326  return ConstTensor5View(mdata + OFFSET(s) + OFFSET(c),
327  mlr, mvr, mbr, mpr, mrr,
328  l, v, b, p, r );
329 }
330 // |-|---|
331 ConstTensor4View ConstTensor7View::operator()
332  ( Index l,
333  const Range& v, Index s, const Range& b,
334  const Range& p, const Range& r, Index c) const
335 {
336  CHECK(l);
337  CHECK(s);
338  CHECK(c);
339  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(c),
340  mvr, mbr, mpr, mrr,
341  v, b, p, r );
342 }
343 
344 // -|----|
345 ConstTensor5View ConstTensor7View::operator()
346  ( const Range& l,
347  Index v, const Range& s, const Range& b,
348  const Range& p, const Range& r, Index c) const
349 {
350  CHECK(v);
351  CHECK(c);
352  return ConstTensor5View(mdata + OFFSET(v) + OFFSET(c),
353  mlr, msr, mbr, mpr, mrr,
354  l, s, b, p, r );
355 }
356 // ||----|
357 ConstTensor4View ConstTensor7View::operator()
358  ( Index l,
359  Index v, const Range& s, const Range& b,
360  const Range& p, const Range& r, Index c) const
361 {
362  CHECK(l);
363  CHECK(v);
364  CHECK(c);
365  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(c),
366  msr, mbr, mpr, mrr,
367  s, b, p, r );
368 }
369 
370 // ----||-
371 ConstTensor5View ConstTensor7View::operator()
372  ( const Range& l,
373  const Range& v, const Range& s, const Range& b,
374  Index p, Index r, const Range& c) const
375 {
376  CHECK(p);
377  CHECK(r);
378  return ConstTensor5View(mdata + OFFSET(p) + OFFSET(r),
379  mlr, mvr, msr, mbr, mcr,
380  l, v, s, b, c );
381 }
382 // |---||-
383 ConstTensor4View ConstTensor7View::operator()
384  ( Index l,
385  const Range& v, const Range& s, const Range& b,
386  Index p, Index r, const Range& c) const
387 {
388  CHECK(l);
389  CHECK(p);
390  CHECK(r);
391  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r),
392  mvr, msr, mbr, mcr,
393  v, s, b, c );
394 }
395 
396 // ---|-|-
397 ConstTensor5View ConstTensor7View::operator()
398  ( const Range& l,
399  const Range& v, const Range& s, Index b,
400  const Range& p, Index r, const Range& c) const
401 {
402  CHECK(b);
403  CHECK(r);
404  return ConstTensor5View(mdata + OFFSET(b) + OFFSET(r),
405  mlr, mvr, msr, mpr, mcr,
406  l, v, s, p, c );
407 }
408 // |--|-|-
409 ConstTensor4View ConstTensor7View::operator()
410  ( Index l,
411  const Range& v, const Range& s, Index b,
412  const Range& p, Index r, const Range& c) const
413 {
414  CHECK(l);
415  CHECK(b);
416  CHECK(r);
417  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r),
418  mvr, msr, mpr, mcr,
419  v, s, p, c );
420 }
421 
422 // --|--|-
423 ConstTensor5View ConstTensor7View::operator()
424  ( const Range& l,
425  const Range& v, Index s, const Range& b,
426  const Range& p, Index r, const Range& c) const
427 {
428  CHECK(s);
429  CHECK(r);
430  return ConstTensor5View(mdata + OFFSET(s) + OFFSET(r),
431  mlr, mvr, mbr, mpr, mcr,
432  l, v, b, p, c );
433 }
434 // |-|--|-
435 ConstTensor4View ConstTensor7View::operator()
436  ( Index l,
437  const Range& v, Index s, const Range& b,
438  const Range& p, Index r, const Range& c) const
439 {
440  CHECK(l);
441  CHECK(s);
442  CHECK(r);
443  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r),
444  mvr, mbr, mpr, mcr,
445  v, b, p, c );
446 }
447 
448 // -|---|-
449 ConstTensor5View ConstTensor7View::operator()
450  ( const Range& l,
451  Index v, const Range& s, const Range& b,
452  const Range& p, Index r, const Range& c) const
453 {
454  CHECK(v);
455  CHECK(r);
456  return ConstTensor5View(mdata + OFFSET(v) + OFFSET(r),
457  mlr, msr, mbr, mpr, mcr,
458  l, s, b, p, c );
459 }
460 // ||---|-
461 ConstTensor4View ConstTensor7View::operator()
462  ( Index l,
463  Index v, const Range& s, const Range& b,
464  const Range& p, Index r, const Range& c) const
465 {
466  CHECK(l);
467  CHECK(v);
468  CHECK(r);
469  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r),
470  msr, mbr, mpr, mcr,
471  s, b, p, c );
472 }
473 
474 // ---||--
475 ConstTensor5View ConstTensor7View::operator()
476  ( const Range& l,
477  const Range& v, const Range& s, Index b,
478  Index p, const Range& r, const Range& c) const
479 {
480  CHECK(b);
481  CHECK(p);
482  return ConstTensor5View(mdata + OFFSET(b) + OFFSET(p),
483  mlr, mvr, msr, mrr, mcr,
484  l, v, s, r, c );
485 }
486 // |--||--
487 ConstTensor4View ConstTensor7View::operator()
488  ( Index l,
489  const Range& v, const Range& s, Index b,
490  Index p, const Range& r, const Range& c) const
491 {
492  CHECK(l);
493  CHECK(b);
494  CHECK(p);
495  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p),
496  mvr, msr, mrr, mcr,
497  v, s, r, c );
498 }
499 
500 // --|-|--
501 ConstTensor5View ConstTensor7View::operator()
502  ( const Range& l,
503  const Range& v, Index s, const Range& b,
504  Index p, const Range& r, const Range& c) const
505 {
506  CHECK(s);
507  CHECK(p);
508  return ConstTensor5View(mdata + OFFSET(s) + OFFSET(p),
509  mlr, mvr, mbr, mrr, mcr,
510  l, v, b, r, c );
511 }
512 // |-|-|--
513 ConstTensor4View ConstTensor7View::operator()
514  ( Index l,
515  const Range& v, Index s, const Range& b,
516  Index p, const Range& r, const Range& c) const
517 {
518  CHECK(l);
519  CHECK(s);
520  CHECK(p);
521  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p),
522  mvr, mbr, mrr, mcr,
523  v, b, r, c );
524 }
525 
526 // -|--|--
527 ConstTensor5View ConstTensor7View::operator()
528  ( const Range& l,
529  Index v, const Range& s, const Range& b,
530  Index p, const Range& r, const Range& c) const
531 {
532  CHECK(v);
533  CHECK(p);
534  return ConstTensor5View(mdata + OFFSET(v) + OFFSET(p),
535  mlr, msr, mbr, mrr, mcr,
536  l, s, b, r, c );
537 }
538 // ||--|--
539 ConstTensor4View ConstTensor7View::operator()
540  ( Index l,
541  Index v, const Range& s, const Range& b,
542  Index p, const Range& r, const Range& c) const
543 {
544  CHECK(l);
545  CHECK(v);
546  CHECK(p);
547  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p),
548  msr, mbr, mrr, mcr,
549  s, b, r, c );
550 }
551 
552 // --||---
553 ConstTensor5View ConstTensor7View::operator()
554  ( const Range& l,
555  const Range& v, Index s, Index b,
556  const Range& p, const Range& r, const Range& c) const
557 {
558  CHECK(s);
559  CHECK(b);
560  return ConstTensor5View(mdata + OFFSET(s) + OFFSET(b),
561  mlr, mvr, mpr, mrr, mcr,
562  l, v, p, r, c );
563 }
564 // |-||---
565 ConstTensor4View ConstTensor7View::operator()
566  ( Index l,
567  const Range& v, Index s, Index b,
568  const Range& p, const Range& r, const Range& c) const
569 {
570  CHECK(l);
571  CHECK(s);
572  CHECK(b);
573  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b),
574  mvr, mpr, mrr, mcr,
575  v, p, r, c );
576 }
577 
578 // -|-|---
579 ConstTensor5View ConstTensor7View::operator()
580  ( const Range& l,
581  Index v, const Range& s, Index b,
582  const Range& p, const Range& r, const Range& c) const
583 {
584  CHECK(v);
585  CHECK(b);
586  return ConstTensor5View(mdata + OFFSET(v) + OFFSET(b),
587  mlr, msr, mpr, mrr, mcr,
588  l, s, p, r, c );
589 }
590 // ||-|---
591 ConstTensor4View ConstTensor7View::operator()
592  ( Index l,
593  Index v, const Range& s, Index b,
594  const Range& p, const Range& r, const Range& c) const
595 {
596  CHECK(l);
597  CHECK(v);
598  CHECK(b);
599  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b),
600  msr, mpr, mrr, mcr,
601  s, p, r, c );
602 }
603 
604 // -||----
605 ConstTensor5View ConstTensor7View::operator()
606  ( const Range& l,
607  Index v, Index s, const Range& b,
608  const Range& p, const Range& r, const Range& c) const
609 {
610  CHECK(v);
611  CHECK(s);
612  return ConstTensor5View(mdata + OFFSET(v) + OFFSET(s),
613  mlr, mbr, mpr, mrr, mcr,
614  l, b, p, r, c );
615 }
616 // |||----
617 ConstTensor4View ConstTensor7View::operator()
618  ( Index l,
619  Index v, Index s, const Range& b,
620  const Range& p, const Range& r, const Range& c) const
621 {
622  CHECK(l);
623  CHECK(v);
624  CHECK(s);
625  return ConstTensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s),
626  mbr, mpr, mrr, mcr,
627  b, p, r, c );
628 }
629 
630 // ----|||
631 ConstTensor4View ConstTensor7View::operator()
632  ( const Range& l,
633  const Range& v, const Range& s, const Range& b,
634  Index p, Index r, Index c) const
635 {
636  CHECK(p);
637  CHECK(r);
638  CHECK(c);
639  return ConstTensor4View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
640  mlr, mvr, msr, mbr,
641  l, v, s, b );
642 }
643 // |---|||
644 ConstTensor3View ConstTensor7View::operator()
645  ( Index l,
646  const Range& v, const Range& s, const Range& b,
647  Index p, Index r, Index c) const
648 {
649  CHECK(l);
650  CHECK(p);
651  CHECK(r);
652  CHECK(c);
653  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r) + OFFSET(c),
654  mvr, msr, mbr,
655  v, s, b );
656 }
657 
658 // ---|-||
659 ConstTensor4View ConstTensor7View::operator()
660  ( const Range& l,
661  const Range& v, const Range& s, Index b,
662  const Range& p, Index r, Index c) const
663 {
664  CHECK(b);
665  CHECK(r);
666  CHECK(c);
667  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
668  mlr, mvr, msr, mpr,
669  l, v, s, p );
670 }
671 // |--|-||
672 ConstTensor3View ConstTensor7View::operator()
673  ( Index l,
674  const Range& v, const Range& s, Index b,
675  const Range& p, Index r, Index c) const
676 {
677  CHECK(l);
678  CHECK(b);
679  CHECK(r);
680  CHECK(c);
681  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r) + OFFSET(c),
682  mvr, msr, mpr,
683  v, s, p );
684 }
685 
686 // --|--||
687 ConstTensor4View ConstTensor7View::operator()
688  ( const Range& l,
689  const Range& v, Index s, const Range& b,
690  const Range& p, Index r, Index c) const
691 {
692  CHECK(s);
693  CHECK(r);
694  CHECK(c);
695  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
696  mlr, mvr, mbr, mpr,
697  l, v, b, p );
698 }
699 // |-|--||
700 ConstTensor3View ConstTensor7View::operator()
701  ( Index l,
702  const Range& v, Index s, const Range& b,
703  const Range& p, Index r, Index c) const
704 {
705  CHECK(l);
706  CHECK(s);
707  CHECK(r);
708  CHECK(c);
709  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r) + OFFSET(c),
710  mvr, mbr, mpr,
711  v, b, p );
712 }
713 
714 // -|---||
715 ConstTensor4View ConstTensor7View::operator()
716  ( const Range& l,
717  Index v, const Range& s, const Range& b,
718  const Range& p, Index r, Index c) const
719 {
720  CHECK(v);
721  CHECK(r);
722  CHECK(c);
723  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
724  mlr, msr, mbr, mpr,
725  l, s, b, p );
726 }
727 // ||---||
728 ConstTensor3View ConstTensor7View::operator()
729  ( Index l,
730  Index v, const Range& s, const Range& b,
731  const Range& p, Index r, Index c) const
732 {
733  CHECK(l);
734  CHECK(v);
735  CHECK(r);
736  CHECK(c);
737  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r) + OFFSET(c),
738  msr, mbr, mpr,
739  s, b, p );
740 }
741 
742 // ---||-|
743 ConstTensor4View ConstTensor7View::operator()
744  ( const Range& l,
745  const Range& v, const Range& s, Index b,
746  Index p, const Range& r, Index c) const
747 {
748  CHECK(b);
749  CHECK(p);
750  CHECK(c);
751  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
752  mlr, mvr, msr, mrr,
753  l, v, s, r );
754 }
755 // |--||-|
756 ConstTensor3View ConstTensor7View::operator()
757  ( Index l,
758  const Range& v, const Range& s, Index b,
759  Index p, const Range& r, Index c) const
760 {
761  CHECK(l);
762  CHECK(b);
763  CHECK(p);
764  CHECK(c);
765  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(c),
766  mvr, msr, mrr,
767  v, s, r );
768 }
769 
770 // --|-|-|
771 ConstTensor4View ConstTensor7View::operator()
772  ( const Range& l,
773  const Range& v, Index s, const Range& b,
774  Index p, const Range& r, Index c) const
775 {
776  CHECK(s);
777  CHECK(p);
778  CHECK(c);
779  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
780  mlr, mvr, mbr, mrr,
781  l, v, b, r );
782 }
783 // |-|-|-|
784 ConstTensor3View ConstTensor7View::operator()
785  ( Index l,
786  const Range& v, Index s, const Range& b,
787  Index p, const Range& r, Index c) const
788 {
789  CHECK(l);
790  CHECK(s);
791  CHECK(p);
792  CHECK(c);
793  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(c),
794  mvr, mbr, mrr,
795  v, b, r );
796 }
797 
798 // -|--|-|
799 ConstTensor4View ConstTensor7View::operator()
800  ( const Range& l,
801  Index v, const Range& s, const Range& b,
802  Index p, const Range& r, Index c) const
803 {
804  CHECK(v);
805  CHECK(p);
806  CHECK(c);
807  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
808  mlr, msr, mbr, mrr,
809  l, s, b, r );
810 }
811 // ||--|-|
812 ConstTensor3View ConstTensor7View::operator()
813  ( Index l,
814  Index v, const Range& s, const Range& b,
815  Index p, const Range& r, Index c) const
816 {
817  CHECK(l);
818  CHECK(v);
819  CHECK(p);
820  CHECK(c);
821  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(c),
822  msr, mbr, mrr,
823  s, b, r );
824 }
825 
826 // --||--|
827 ConstTensor4View ConstTensor7View::operator()
828  ( const Range& l,
829  const Range& v, Index s, Index b,
830  const Range& p, const Range& r, Index c) const
831 {
832  CHECK(s);
833  CHECK(b);
834  CHECK(c);
835  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
836  mlr, mvr, mpr, mrr,
837  l, v, p, r );
838 }
839 // |-||--|
840 ConstTensor3View ConstTensor7View::operator()
841  ( Index l,
842  const Range& v, Index s, Index b,
843  const Range& p, const Range& r, Index c) const
844 {
845  CHECK(l);
846  CHECK(s);
847  CHECK(b);
848  CHECK(c);
849  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(c),
850  mvr, mpr, mrr,
851  v, p, r );
852 }
853 
854 // -|-|--|
855 ConstTensor4View ConstTensor7View::operator()
856  ( const Range& l,
857  Index v, const Range& s, Index b,
858  const Range& p, const Range& r, Index c) const
859 {
860  CHECK(v);
861  CHECK(b);
862  CHECK(c);
863  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
864  mlr, msr, mpr, mrr,
865  l, s, p, r );
866 }
867 // ||-|--|
868 ConstTensor3View ConstTensor7View::operator()
869  ( Index l,
870  Index v, const Range& s, Index b,
871  const Range& p, const Range& r, Index c) const
872 {
873  CHECK(l);
874  CHECK(v);
875  CHECK(b);
876  CHECK(c);
877  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(c),
878  msr, mpr, mrr,
879  s, p, r );
880 }
881 
882 // -||---|
883 ConstTensor4View ConstTensor7View::operator()
884  ( const Range& l,
885  Index v, Index s, const Range& b,
886  const Range& p, const Range& r, Index c) const
887 {
888  CHECK(v);
889  CHECK(s);
890  CHECK(c);
891  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
892  mlr, mbr, mpr, mrr,
893  l, b, p, r );
894 }
895 // |||---|
896 ConstTensor3View ConstTensor7View::operator()
897  ( Index l,
898  Index v, Index s, const Range& b,
899  const Range& p, const Range& r, Index c) const
900 {
901  CHECK(l);
902  CHECK(v);
903  CHECK(s);
904  CHECK(c);
905  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(c),
906  mbr, mpr, mrr,
907  b, p, r );
908 }
909 
910 // ---|||-
911 ConstTensor4View ConstTensor7View::operator()
912  ( const Range& l,
913  const Range& v, const Range& s, Index b,
914  Index p, Index r, const Range& c) const
915 {
916  CHECK(b);
917  CHECK(p);
918  CHECK(r);
919  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r),
920  mlr, mvr, msr, mcr,
921  l, v, s, c );
922 }
923 // |--|||-
924 ConstTensor3View ConstTensor7View::operator()
925  ( Index l,
926  const Range& v, const Range& s, Index b,
927  Index p, Index r, const Range& c) const
928 {
929  CHECK(l);
930  CHECK(b);
931  CHECK(p);
932  CHECK(r);
933  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r),
934  mvr, msr, mcr,
935  v, s, c );
936 }
937 
938 // --|-||-
939 ConstTensor4View ConstTensor7View::operator()
940  ( const Range& l,
941  const Range& v, Index s, const Range& b,
942  Index p, Index r, const Range& c) const
943 {
944  CHECK(s);
945  CHECK(p);
946  CHECK(r);
947  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r),
948  mlr, mvr, mbr, mcr,
949  l, v, b, c );
950 }
951 // |-|-||-
952 ConstTensor3View ConstTensor7View::operator()
953  ( Index l,
954  const Range& v, Index s, const Range& b,
955  Index p, Index r, const Range& c) const
956 {
957  CHECK(l);
958  CHECK(s);
959  CHECK(p);
960  CHECK(r);
961  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(r),
962  mvr, mbr, mcr,
963  v, b, c );
964 }
965 
966 // -|--||-
967 ConstTensor4View ConstTensor7View::operator()
968  ( const Range& l,
969  Index v, const Range& s, const Range& b,
970  Index p, Index r, const Range& c) const
971 {
972  CHECK(v);
973  CHECK(p);
974  CHECK(r);
975  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r),
976  mlr, msr, mbr, mcr,
977  l, s, b, c );
978 }
979 // ||--||-
980 ConstTensor3View ConstTensor7View::operator()
981  ( Index l,
982  Index v, const Range& s, const Range& b,
983  Index p, Index r, const Range& c) const
984 {
985  CHECK(l);
986  CHECK(v);
987  CHECK(p);
988  CHECK(r);
989  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r),
990  msr, mbr, mcr,
991  s, b, c );
992 }
993 
994 // --||-|-
995 ConstTensor4View ConstTensor7View::operator()
996  ( const Range& l,
997  const Range& v, Index s, Index b,
998  const Range& p, Index r, const Range& c) const
999 {
1000  CHECK(s);
1001  CHECK(b);
1002  CHECK(r);
1003  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r),
1004  mlr, mvr, mpr, mcr,
1005  l, v, p, c );
1006 }
1007 // |-||-|-
1008 ConstTensor3View ConstTensor7View::operator()
1009  ( Index l,
1010  const Range& v, Index s, Index b,
1011  const Range& p, Index r, const Range& c) const
1012 {
1013  CHECK(l);
1014  CHECK(s);
1015  CHECK(b);
1016  CHECK(r);
1017  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1018  mvr, mpr, mcr,
1019  v, p, c );
1020 }
1021 
1022 // -|-|-|-
1023 ConstTensor4View ConstTensor7View::operator()
1024  ( const Range& l,
1025  Index v, const Range& s, Index b,
1026  const Range& p, Index r, const Range& c) const
1027 {
1028  CHECK(v);
1029  CHECK(b);
1030  CHECK(r);
1031  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r),
1032  mlr, msr, mpr, mcr,
1033  l, s, p, c );
1034 }
1035 // ||-|-|-
1036 ConstTensor3View ConstTensor7View::operator()
1037  ( Index l,
1038  Index v, const Range& s, Index b,
1039  const Range& p, Index r, const Range& c) const
1040 {
1041  CHECK(l);
1042  CHECK(v);
1043  CHECK(b);
1044  CHECK(r);
1045  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r),
1046  msr, mpr, mcr,
1047  s, p, c );
1048 }
1049 
1050 // -||--|-
1051 ConstTensor4View ConstTensor7View::operator()
1052  ( const Range& l,
1053  Index v, Index s, const Range& b,
1054  const Range& p, Index r, const Range& c) const
1055 {
1056  CHECK(v);
1057  CHECK(s);
1058  CHECK(r);
1059  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r),
1060  mlr, mbr, mpr, mcr,
1061  l, b, p, c );
1062 }
1063 // |||--|-
1064 ConstTensor3View ConstTensor7View::operator()
1065  ( Index l,
1066  Index v, Index s, const Range& b,
1067  const Range& p, Index r, const Range& c) const
1068 {
1069  CHECK(l);
1070  CHECK(v);
1071  CHECK(s);
1072  CHECK(r);
1073  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r),
1074  mbr, mpr, mcr,
1075  b, p, c );
1076 }
1077 
1078 // --|||--
1079 ConstTensor4View ConstTensor7View::operator()
1080  ( const Range& l,
1081  const Range& v, Index s, Index b,
1082  Index p, const Range& r, const Range& c) const
1083 {
1084  CHECK(s);
1085  CHECK(b);
1086  CHECK(p);
1087  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p),
1088  mlr, mvr, mrr, mcr,
1089  l, v, r, c );
1090 }
1091 // |-|||--
1092 ConstTensor3View ConstTensor7View::operator()
1093  ( Index l,
1094  const Range& v, Index s, Index b,
1095  Index p, const Range& r, const Range& c) const
1096 {
1097  CHECK(l);
1098  CHECK(s);
1099  CHECK(b);
1100  CHECK(p);
1101  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1102  mvr, mrr, mcr,
1103  v, r, c );
1104 }
1105 
1106 // -|-||--
1107 ConstTensor4View ConstTensor7View::operator()
1108  ( const Range& l,
1109  Index v, const Range& s, Index b,
1110  Index p, const Range& r, const Range& c) const
1111 {
1112  CHECK(v);
1113  CHECK(b);
1114  CHECK(p);
1115  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p),
1116  mlr, msr, mrr, mcr,
1117  l, s, r, c );
1118 }
1119 // ||-||--
1120 ConstTensor3View ConstTensor7View::operator()
1121  ( Index l,
1122  Index v, const Range& s, Index b,
1123  Index p, const Range& r, const Range& c) const
1124 {
1125  CHECK(l);
1126  CHECK(v);
1127  CHECK(b);
1128  CHECK(p);
1129  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p),
1130  msr, mrr, mcr,
1131  s, r, c );
1132 }
1133 
1134 // -||-|--
1135 ConstTensor4View ConstTensor7View::operator()
1136  ( const Range& l,
1137  Index v, Index s, const Range& b,
1138  Index p, const Range& r, const Range& c) const
1139 {
1140  CHECK(v);
1141  CHECK(s);
1142  CHECK(p);
1143  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p),
1144  mlr, mbr, mrr, mcr,
1145  l, b, r, c );
1146 }
1147 // |||-|--
1148 ConstTensor3View ConstTensor7View::operator()
1149  ( Index l,
1150  Index v, Index s, const Range& b,
1151  Index p, const Range& r, const Range& c) const
1152 {
1153  CHECK(l);
1154  CHECK(v);
1155  CHECK(s);
1156  CHECK(p);
1157  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p),
1158  mbr, mrr, mcr,
1159  b, r, c );
1160 }
1161 
1162 // -|||---
1163 ConstTensor4View ConstTensor7View::operator()
1164  ( const Range& l,
1165  Index v, Index s, Index b,
1166  const Range& p, const Range& r, const Range& c) const
1167 {
1168  CHECK(v);
1169  CHECK(s);
1170  CHECK(b);
1171  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b),
1172  mlr, mpr, mrr, mcr,
1173  l, p, r, c );
1174 }
1175 // ||||---
1176 ConstTensor3View ConstTensor7View::operator()
1177  ( Index l,
1178  Index v, Index s, Index b,
1179  const Range& p, const Range& r, const Range& c) const
1180 {
1181  CHECK(l);
1182  CHECK(v);
1183  CHECK(s);
1184  CHECK(b);
1185  return ConstTensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b),
1186  mpr, mrr, mcr,
1187  p, r, c );
1188 }
1189 
1190 // -||||--
1191 ConstTensor3View ConstTensor7View::operator()
1192  ( const Range& l,
1193  Index v, Index s, Index b,
1194  Index p, const Range& r, const Range& c) const
1195 {
1196  CHECK(v);
1197  CHECK(s);
1198  CHECK(b);
1199  CHECK(p);
1200  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1201  mlr, mrr, mcr,
1202  l, r, c );
1203 }
1204 // |||||--
1205 ConstMatrixView ConstTensor7View::operator()
1206  ( Index l,
1207  Index v, Index s, Index b,
1208  Index p, const Range& r, const Range& c) const
1209 {
1210  CHECK(l);
1211  CHECK(v);
1212  CHECK(s);
1213  CHECK(b);
1214  CHECK(p);
1215  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
1216  mrr, mcr,
1217  r, c );
1218 }
1219 
1220 // -|||-|-
1221 ConstTensor3View ConstTensor7View::operator()
1222  ( const Range& l,
1223  Index v, Index s, Index b,
1224  const Range& p, Index r, const Range& c) const
1225 {
1226  CHECK(v);
1227  CHECK(s);
1228  CHECK(b);
1229  CHECK(r);
1230  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1231  mlr, mpr, mcr,
1232  l, p, c );
1233 }
1234 // ||||-|-
1235 ConstMatrixView ConstTensor7View::operator()
1236  ( Index l,
1237  Index v, Index s, Index b,
1238  const Range& p, Index r, const Range& c) const
1239 {
1240  CHECK(l);
1241  CHECK(v);
1242  CHECK(s);
1243  CHECK(b);
1244  CHECK(r);
1245  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
1246  mpr, mcr,
1247  p, c );
1248 }
1249 
1250 // -||-||-
1251 ConstTensor3View ConstTensor7View::operator()
1252  ( const Range& l,
1253  Index v, Index s, const Range& b,
1254  Index p, Index r, const Range& c) const
1255 {
1256  CHECK(v);
1257  CHECK(s);
1258  CHECK(p);
1259  CHECK(r);
1260  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
1261  mlr, mbr, mcr,
1262  l, b, c );
1263 }
1264 // |||-||-
1265 ConstMatrixView ConstTensor7View::operator()
1266  ( Index l,
1267  Index v, Index s, const Range& b,
1268  Index p, Index r, const Range& c) const
1269 {
1270  CHECK(l);
1271  CHECK(v);
1272  CHECK(s);
1273  CHECK(p);
1274  CHECK(r);
1275  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
1276  mbr, mcr,
1277  b, c );
1278 }
1279 
1280 // -|-|||-
1281 ConstTensor3View ConstTensor7View::operator()
1282  ( const Range& l,
1283  Index v, const Range& s, Index b,
1284  Index p, Index r, const Range& c) const
1285 {
1286  CHECK(v);
1287  CHECK(b);
1288  CHECK(p);
1289  CHECK(r);
1290  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1291  mlr, msr, mcr,
1292  l, s, c );
1293 }
1294 // ||-|||-
1295 ConstMatrixView ConstTensor7View::operator()
1296  ( Index l,
1297  Index v, const Range& s, Index b,
1298  Index p, Index r, const Range& c) const
1299 {
1300  CHECK(l);
1301  CHECK(v);
1302  CHECK(b);
1303  CHECK(p);
1304  CHECK(r);
1305  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1306  msr, mcr,
1307  s, c );
1308 }
1309 
1310 // --||||-
1311 ConstTensor3View ConstTensor7View::operator()
1312  ( const Range& l,
1313  const Range& v, Index s, Index b,
1314  Index p, Index r, const Range& c) const
1315 {
1316  CHECK(s);
1317  CHECK(b);
1318  CHECK(p);
1319  CHECK(r);
1320  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1321  mlr, mvr, mcr,
1322  l, v, c );
1323 }
1324 // |-||||-
1325 ConstMatrixView ConstTensor7View::operator()
1326  ( Index l,
1327  const Range& v, Index s, Index b,
1328  Index p, Index r, const Range& c) const
1329 {
1330  CHECK(l);
1331  CHECK(s);
1332  CHECK(b);
1333  CHECK(p);
1334  CHECK(r);
1335  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1336  mvr, mcr,
1337  v, c );
1338 }
1339 
1340 // -|||--|
1341 ConstTensor3View ConstTensor7View::operator()
1342  ( const Range& l,
1343  Index v, Index s, Index b,
1344  const Range& p, const Range& r, Index c) const
1345 {
1346  CHECK(v);
1347  CHECK(s);
1348  CHECK(b);
1349  CHECK(c);
1350  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
1351  mlr, mpr, mrr,
1352  l, p, r );
1353 }
1354 // ||||--|
1355 ConstMatrixView ConstTensor7View::operator()
1356  ( Index l,
1357  Index v, Index s, Index b,
1358  const Range& p, const Range& r, Index c) const
1359 {
1360  CHECK(l);
1361  CHECK(v);
1362  CHECK(s);
1363  CHECK(b);
1364  CHECK(c);
1365  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
1366  mpr, mrr,
1367  p, r );
1368 }
1369 
1370 // -||-|-|
1371 ConstTensor3View ConstTensor7View::operator()
1372  ( const Range& l,
1373  Index v, Index s, const Range& b,
1374  Index p, const Range& r, Index c) const
1375 {
1376  CHECK(v);
1377  CHECK(s);
1378  CHECK(p);
1379  CHECK(c);
1380  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
1381  mlr, mbr, mrr,
1382  l, b, r );
1383 }
1384 // |||-|-|
1385 ConstMatrixView ConstTensor7View::operator()
1386  ( Index l,
1387  Index v, Index s, const Range& b,
1388  Index p, const Range& r, Index c) const
1389 {
1390  CHECK(l);
1391  CHECK(v);
1392  CHECK(s);
1393  CHECK(p);
1394  CHECK(c);
1395  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
1396  mbr, mrr,
1397  b, r );
1398 }
1399 
1400 // -|-||-|
1401 ConstTensor3View ConstTensor7View::operator()
1402  ( const Range& l,
1403  Index v, const Range& s, Index b,
1404  Index p, const Range& r, Index c) const
1405 {
1406  CHECK(v);
1407  CHECK(b);
1408  CHECK(p);
1409  CHECK(c);
1410  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1411  mlr, msr, mrr,
1412  l, s, r );
1413 }
1414 // ||-||-|
1415 ConstMatrixView ConstTensor7View::operator()
1416  ( Index l,
1417  Index v, const Range& s, Index b,
1418  Index p, const Range& r, Index c) const
1419 {
1420  CHECK(l);
1421  CHECK(v);
1422  CHECK(b);
1423  CHECK(p);
1424  CHECK(c);
1425  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1426  msr, mrr,
1427  s, r );
1428 }
1429 
1430 // --|||-|
1431 ConstTensor3View ConstTensor7View::operator()
1432  ( const Range& l,
1433  const Range& v, Index s, Index b,
1434  Index p, const Range& r, Index c) const
1435 {
1436  CHECK(s);
1437  CHECK(b);
1438  CHECK(p);
1439  CHECK(c);
1440  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1441  mlr, mvr, mrr,
1442  l, v, r );
1443 }
1444 // |-|||-|
1445 ConstMatrixView ConstTensor7View::operator()
1446  ( Index l,
1447  const Range& v, Index s, Index b,
1448  Index p, const Range& r, Index c) const
1449 {
1450  CHECK(l);
1451  CHECK(s);
1452  CHECK(b);
1453  CHECK(p);
1454  CHECK(c);
1455  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1456  mvr, mrr,
1457  v, r );
1458 }
1459 
1460 // -||--||
1461 ConstTensor3View ConstTensor7View::operator()
1462  ( const Range& l,
1463  Index v, Index s, const Range& b,
1464  const Range& p, Index r, Index c) const
1465 {
1466  CHECK(v);
1467  CHECK(s);
1468  CHECK(r);
1469  CHECK(c);
1470  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
1471  mlr, mbr, mpr,
1472  l, b, p );
1473 }
1474 // |||--||
1475 ConstMatrixView ConstTensor7View::operator()
1476  ( Index l,
1477  Index v, Index s, const Range& b,
1478  const Range& p, Index r, Index c) const
1479 {
1480  CHECK(l);
1481  CHECK(v);
1482  CHECK(s);
1483  CHECK(r);
1484  CHECK(c);
1485  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
1486  mbr, mpr,
1487  b, p );
1488 }
1489 
1490 // -|-|-||
1491 ConstTensor3View ConstTensor7View::operator()
1492  ( const Range& l,
1493  Index v, const Range& s, Index b,
1494  const Range& p, Index r, Index c) const
1495 {
1496  CHECK(v);
1497  CHECK(b);
1498  CHECK(r);
1499  CHECK(c);
1500  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1501  mlr, msr, mpr,
1502  l, s, p );
1503 }
1504 // ||-|-||
1505 ConstMatrixView ConstTensor7View::operator()
1506  ( Index l,
1507  Index v, const Range& s, Index b,
1508  const Range& p, Index r, Index c) const
1509 {
1510  CHECK(l);
1511  CHECK(v);
1512  CHECK(b);
1513  CHECK(r);
1514  CHECK(c);
1515  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1516  msr, mpr,
1517  s, p );
1518 }
1519 
1520 // --||-||
1521 ConstTensor3View ConstTensor7View::operator()
1522  ( const Range& l,
1523  const Range& v, Index s, Index b,
1524  const Range& p, Index r, Index c) const
1525 {
1526  CHECK(s);
1527  CHECK(b);
1528  CHECK(r);
1529  CHECK(c);
1530  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1531  mlr, mvr, mpr,
1532  l, v, p );
1533 }
1534 // |-||-||
1535 ConstMatrixView ConstTensor7View::operator()
1536  ( Index l,
1537  const Range& v, Index s, Index b,
1538  const Range& p, Index r, Index c) const
1539 {
1540  CHECK(l);
1541  CHECK(s);
1542  CHECK(b);
1543  CHECK(r);
1544  CHECK(c);
1545  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1546  mvr, mpr,
1547  v, p );
1548 }
1549 
1550 // -|--|||
1551 ConstTensor3View ConstTensor7View::operator()
1552  ( const Range& l,
1553  Index v, const Range& s, const Range& b,
1554  Index p, Index r, Index c) const
1555 {
1556  CHECK(v);
1557  CHECK(p);
1558  CHECK(r);
1559  CHECK(c);
1560  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1561  mlr, msr, mbr,
1562  l, s, b );
1563 }
1564 // ||--|||
1565 ConstMatrixView ConstTensor7View::operator()
1566  ( Index l,
1567  Index v, const Range& s, const Range& b,
1568  Index p, Index r, Index c) const
1569 {
1570  CHECK(l);
1571  CHECK(v);
1572  CHECK(p);
1573  CHECK(r);
1574  CHECK(c);
1575  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1576  msr, mbr,
1577  s, b );
1578 }
1579 
1580 // --|-|||
1581 ConstTensor3View ConstTensor7View::operator()
1582  ( const Range& l,
1583  const Range& v, Index s, const Range& b,
1584  Index p, Index r, Index c) const
1585 {
1586  CHECK(s);
1587  CHECK(p);
1588  CHECK(r);
1589  CHECK(c);
1590  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1591  mlr, mvr, mbr,
1592  l, v, b );
1593 }
1594 // |-|-|||
1595 ConstMatrixView ConstTensor7View::operator()
1596  ( Index l,
1597  const Range& v, Index s, const Range& b,
1598  Index p, Index r, Index c) const
1599 {
1600  CHECK(l);
1601  CHECK(s);
1602  CHECK(p);
1603  CHECK(r);
1604  CHECK(c);
1605  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1606  mvr, mbr,
1607  v, b );
1608 }
1609 
1610 // ---||||
1611 ConstTensor3View ConstTensor7View::operator()
1612  ( const Range& l,
1613  const Range& v, const Range& s, Index b,
1614  Index p, Index r, Index c) const
1615 {
1616  CHECK(b);
1617  CHECK(p);
1618  CHECK(r);
1619  CHECK(c);
1620  return ConstTensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1621  mlr, mvr, msr,
1622  l, v, s );
1623 }
1624 // |--||||
1625 ConstMatrixView ConstTensor7View::operator()
1626  ( Index l,
1627  const Range& v, const Range& s, Index b,
1628  Index p, Index r, Index c) const
1629 {
1630  CHECK(l);
1631  CHECK(b);
1632  CHECK(p);
1633  CHECK(r);
1634  CHECK(c);
1635  return ConstMatrixView(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1636  mvr, msr,
1637  v, s );
1638 }
1639 
1640 // -|||||-
1641 ConstMatrixView ConstTensor7View::operator()
1642  ( const Range& l,
1643  Index v, Index s, Index b,
1644  Index p, Index r, const Range& c) const
1645 {
1646  CHECK(v);
1647  CHECK(s);
1648  CHECK(b);
1649  CHECK(p);
1650  CHECK(r);
1651  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1652  mlr, mcr,
1653  l, c );
1654 }
1655 // ||||||-
1656 ConstVectorView ConstTensor7View::operator()
1657  ( Index l,
1658  Index v, Index s, Index b,
1659  Index p, Index r, const Range& c) const
1660 {
1661  CHECK(l);
1662  CHECK(v);
1663  CHECK(s);
1664  CHECK(b);
1665  CHECK(p);
1666  CHECK(r);
1667  return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
1668  mcr,
1669  c );
1670 }
1671 
1672 // -||||-|
1673 ConstMatrixView ConstTensor7View::operator()
1674  ( const Range& l,
1675  Index v, Index s, Index b,
1676  Index p, const Range& r, Index c) const
1677 {
1678  CHECK(v);
1679  CHECK(s);
1680  CHECK(b);
1681  CHECK(p);
1682  CHECK(c);
1683  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1684  mlr, mrr,
1685  l, r );
1686 }
1687 // |||||-|
1688 ConstVectorView ConstTensor7View::operator()
1689  ( Index l,
1690  Index v, Index s, Index b,
1691  Index p, const Range& r, Index c) const
1692 {
1693  CHECK(l);
1694  CHECK(v);
1695  CHECK(s);
1696  CHECK(b);
1697  CHECK(p);
1698  CHECK(c);
1699  return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
1700  mrr,
1701  r );
1702 }
1703 
1704 // -|||-||
1705 ConstMatrixView ConstTensor7View::operator()
1706  ( const Range& l,
1707  Index v, Index s, Index b,
1708  const Range& p, Index r, Index c) const
1709 {
1710  CHECK(v);
1711  CHECK(s);
1712  CHECK(b);
1713  CHECK(r);
1714  CHECK(c);
1715  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1716  mlr, mpr,
1717  l, p );
1718 }
1719 // ||||-||
1720 ConstVectorView ConstTensor7View::operator()
1721  ( Index l,
1722  Index v, Index s, Index b,
1723  const Range& p, Index r, Index c) const
1724 {
1725  CHECK(l);
1726  CHECK(v);
1727  CHECK(s);
1728  CHECK(b);
1729  CHECK(r);
1730  CHECK(c);
1731  return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
1732  mpr,
1733  p );
1734 }
1735 
1736 // -||-|||
1737 ConstMatrixView ConstTensor7View::operator()
1738  ( const Range& l,
1739  Index v, Index s, const Range& b,
1740  Index p, Index r, Index c) const
1741 {
1742  CHECK(v);
1743  CHECK(s);
1744  CHECK(p);
1745  CHECK(r);
1746  CHECK(c);
1747  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1748  mlr, mbr,
1749  l, b );
1750 }
1751 // |||-|||
1752 ConstVectorView ConstTensor7View::operator()
1753  ( Index l,
1754  Index v, Index s, const Range& b,
1755  Index p, Index r, Index c) const
1756 {
1757  CHECK(l);
1758  CHECK(v);
1759  CHECK(s);
1760  CHECK(p);
1761  CHECK(r);
1762  CHECK(c);
1763  return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1764  mbr,
1765  b );
1766 }
1767 
1768 // -|-||||
1769 ConstMatrixView ConstTensor7View::operator()
1770  ( const Range& l,
1771  Index v, const Range& s, Index b,
1772  Index p, Index r, Index c) const
1773 {
1774  CHECK(v);
1775  CHECK(b);
1776  CHECK(p);
1777  CHECK(r);
1778  CHECK(c);
1779  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1780  mlr, msr,
1781  l, s );
1782 }
1783 // ||-||||
1784 ConstVectorView ConstTensor7View::operator()
1785  ( Index l,
1786  Index v, const Range& s, Index b,
1787  Index p, Index r, Index c) const
1788 {
1789  CHECK(l);
1790  CHECK(v);
1791  CHECK(b);
1792  CHECK(p);
1793  CHECK(r);
1794  CHECK(c);
1795  return ConstVectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1796  msr,
1797  s );
1798 }
1799 
1800 // --|||||
1801 ConstMatrixView ConstTensor7View::operator()
1802  ( const Range& l,
1803  const Range& v, Index s, Index b,
1804  Index p, Index r, Index c) const
1805 {
1806  CHECK(s);
1807  CHECK(b);
1808  CHECK(p);
1809  CHECK(r);
1810  CHECK(c);
1811  return ConstMatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1812  mlr, mvr,
1813  l, v );
1814 }
1815 // |-|||||
1816 ConstVectorView ConstTensor7View::operator()
1817  ( Index l,
1818  const Range& v, Index s, Index b,
1819  Index p, Index r, Index c) const
1820 {
1821  CHECK(l);
1822  CHECK(s);
1823  CHECK(b);
1824  CHECK(p);
1825  CHECK(r);
1826  CHECK(c);
1827  return ConstVectorView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
1828  mvr,
1829  v );
1830 }
1831 
1832 // -||||||
1833 ConstVectorView ConstTensor7View::operator()
1834  ( const Range& l,
1835  Index v, Index s, Index b,
1836  Index p, Index r, Index c) const
1837 {
1838  CHECK(v);
1839  CHECK(s);
1840  CHECK(b);
1841  CHECK(p);
1842  CHECK(r);
1843  CHECK(c);
1844  return ConstVectorView( mdata +
1845  OFFSET(v) + OFFSET(s) + OFFSET(b) +
1846  OFFSET(p) + OFFSET(r) + OFFSET(c),
1847  mlr,
1848  l );
1849 }
1850 
1853 {
1855  mvr,
1856  msr,
1857  mbr,
1858  mpr,
1859  mrr,
1860  mcr),
1861  mlr.mstride);
1862 }
1863 
1866 {
1868  (mlr.mextent)*mlr.mstride,
1869  mvr,
1870  msr,
1871  mbr,
1872  mpr,
1873  mrr,
1874  mcr),
1875  mlr.mstride );
1876 }
1877 
1880  mlr(0,1,
1881  a.mvr.mextent*
1882  a.msr.mextent*
1883  a.mbr.mextent*
1884  a.mpr.mextent*
1885  a.mrr.mextent*
1886  a.mcr.mextent),
1887  mvr(a.mvr),
1888  msr(a.msr),
1889  mbr(a.mbr),
1890  mpr(a.mpr),
1891  mrr(a.mrr),
1892  mcr(a.mcr),
1893  mdata(a.mdata)
1894 {
1895  // Nothing to do here.
1896 }
1897 
1901  mlr(0,0,1),
1902  mvr(0,0,1), msr(0,0,1), mbr(0,0,1),
1903  mpr(0,0,1), mrr(0,0,1), mcr(0,0,1),
1904  mdata(NULL)
1905 {
1906  // Nothing to do here.
1907 }
1908 
1914  const Range& l,
1915  const Range& v,
1916  const Range& s,
1917  const Range& b,
1918  const Range& p,
1919  const Range& r,
1920  const Range& c) :
1921  mlr(l),
1922  mvr(v),
1923  msr(s),
1924  mbr(b),
1925  mpr(p),
1926  mrr(r),
1927  mcr(c),
1928  mdata(data)
1929 {
1930  // Nothing to do here.
1931 }
1932 
1941  const Range& pl,
1942  const Range& pv,
1943  const Range& ps,
1944  const Range& pb,
1945  const Range& pp,
1946  const Range& pr,
1947  const Range& pc,
1948  const Range& nl,
1949  const Range& nv,
1950  const Range& ns,
1951  const Range& nb,
1952  const Range& np,
1953  const Range& nr,
1954  const Range& nc) :
1955  mlr(pl,nl),
1956  mvr(pv,nv),
1957  msr(ps,ns),
1958  mbr(pb,nb),
1959  mpr(pp,np),
1960  mrr(pr,nr),
1961  mcr(pc,nc),
1962  mdata(data)
1963 {
1964  // Nothing to do here.
1965 }
1966 
1970 ostream& operator<<(ostream& os, const ConstTensor7View& v)
1971 {
1972  // Page iterators:
1973  ConstIterator7D ip=v.begin();
1974  const ConstIterator7D end_page=v.end();
1975 
1976  if ( ip!=end_page )
1977  {
1978  os << *ip;
1979  ++ip;
1980  }
1981 
1982  for ( ; ip!=end_page; ++ip )
1983  {
1984  os << "\n\n";
1985  os << *ip;
1986  }
1987 
1988  return os;
1989 }
1990 
1991 
1992 // Functions for Tensor7View:
1993 // -------------------------
1994 
1995 // Const index operators:
1996 
1997 // -------
1998 ConstTensor7View Tensor7View::operator()
1999  ( const Range& l,
2000  const Range& v, const Range& s, const Range& b,
2001  const Range& p, const Range& r, const Range& c) const
2002 {
2003  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2004 }
2005 // |------
2006 ConstTensor6View Tensor7View::operator()
2007  ( Index l,
2008  const Range& v, const Range& s, const Range& b,
2009  const Range& p, const Range& r, const Range& c) const
2010 {
2011  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2012 }
2013 
2014 // ------|
2015 ConstTensor6View Tensor7View::operator()
2016  ( const Range& l,
2017  const Range& v, const Range& s, const Range& b,
2018  const Range& p, const Range& r, Index c) const
2019 {
2020  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2021 }
2022 // |-----|
2023 ConstTensor5View Tensor7View::operator()
2024  ( Index l,
2025  const Range& v, const Range& s, const Range& b,
2026  const Range& p, const Range& r, Index c) const
2027 {
2028  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2029 }
2030 
2031 // -----|-
2032 ConstTensor6View Tensor7View::operator()
2033  ( const Range& l,
2034  const Range& v, const Range& s, const Range& b,
2035  const Range& p, Index r, const Range& c) const
2036 {
2037  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2038 }
2039 // |----|-
2040 ConstTensor5View Tensor7View::operator()
2041  ( Index l,
2042  const Range& v, const Range& s, const Range& b,
2043  const Range& p, Index r, const Range& c) const
2044 {
2045  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2046 }
2047 
2048 // ----|--
2049 ConstTensor6View Tensor7View::operator()
2050  ( const Range& l,
2051  const Range& v, const Range& s, const Range& b,
2052  Index p, const Range& r, const Range& c) const
2053 {
2054  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2055 }
2056 // |---|--
2057 ConstTensor5View Tensor7View::operator()
2058  ( Index l,
2059  const Range& v, const Range& s, const Range& b,
2060  Index p, const Range& r, const Range& c) const
2061 {
2062  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2063 }
2064 
2065 // ---|---
2066 ConstTensor6View Tensor7View::operator()
2067  ( const Range& l,
2068  const Range& v, const Range& s, Index b,
2069  const Range& p, const Range& r, const Range& c) const
2070 {
2071  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2072 }
2073 // |--|---
2074 ConstTensor5View Tensor7View::operator()
2075  ( Index l,
2076  const Range& v, const Range& s, Index b,
2077  const Range& p, const Range& r, const Range& c) const
2078 {
2079  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2080 }
2081 
2082 // --|----
2083 ConstTensor6View Tensor7View::operator()
2084  ( const Range& l,
2085  const Range& v, Index s, const Range& b,
2086  const Range& p, const Range& r, const Range& c) const
2087 {
2088  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2089 }
2090 // |-|----
2091 ConstTensor5View Tensor7View::operator()
2092  ( Index l,
2093  const Range& v, Index s, const Range& b,
2094  const Range& p, const Range& r, const Range& c) const
2095 {
2096  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2097 }
2098 
2099 // -|-----
2100 ConstTensor6View Tensor7View::operator()
2101  ( const Range& l,
2102  Index v, const Range& s, const Range& b,
2103  const Range& p, const Range& r, const Range& c) const
2104 {
2105  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2106 }
2107 // ||-----
2108 ConstTensor5View Tensor7View::operator()
2109  ( Index l,
2110  Index v, const Range& s, const Range& b,
2111  const Range& p, const Range& r, const Range& c) const
2112 {
2113  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2114 }
2115 
2116 // -----||
2117 ConstTensor5View Tensor7View::operator()
2118  ( const Range& l,
2119  const Range& v, const Range& s, const Range& b,
2120  const Range& p, Index r, Index c) const
2121 {
2122  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2123 }
2124 // |----||
2125 ConstTensor4View Tensor7View::operator()
2126  ( Index l,
2127  const Range& v, const Range& s, const Range& b,
2128  const Range& p, Index r, Index c) const
2129 {
2130  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2131 }
2132 
2133 // ----|-|
2134 ConstTensor5View Tensor7View::operator()
2135  ( const Range& l,
2136  const Range& v, const Range& s, const Range& b,
2137  Index p, const Range& r, Index c) const
2138 {
2139  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2140 }
2141 // |---|-|
2142 ConstTensor4View Tensor7View::operator()
2143  ( Index l,
2144  const Range& v, const Range& s, const Range& b,
2145  Index p, const Range& r, Index c) const
2146 {
2147  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2148 }
2149 
2150 // ---|--|
2151 ConstTensor5View Tensor7View::operator()
2152  ( const Range& l,
2153  const Range& v, const Range& s, Index b,
2154  const Range& p, const Range& r, Index c) const
2155 {
2156  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2157 }
2158 // |--|--|
2159 ConstTensor4View Tensor7View::operator()
2160  ( Index l,
2161  const Range& v, const Range& s, Index b,
2162  const Range& p, const Range& r, Index c) const
2163 {
2164  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2165 }
2166 
2167 // --|---|
2168 ConstTensor5View Tensor7View::operator()
2169  ( const Range& l,
2170  const Range& v, Index s, const Range& b,
2171  const Range& p, const Range& r, Index c) const
2172 {
2173  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2174 }
2175 // |-|---|
2176 ConstTensor4View Tensor7View::operator()
2177  ( Index l,
2178  const Range& v, Index s, const Range& b,
2179  const Range& p, const Range& r, Index c) const
2180 {
2181  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2182 }
2183 
2184 // -|----|
2185 ConstTensor5View Tensor7View::operator()
2186  ( const Range& l,
2187  Index v, const Range& s, const Range& b,
2188  const Range& p, const Range& r, Index c) const
2189 {
2190  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2191 }
2192 // ||----|
2193 ConstTensor4View Tensor7View::operator()
2194  ( Index l,
2195  Index v, const Range& s, const Range& b,
2196  const Range& p, const Range& r, Index c) const
2197 {
2198  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2199 }
2200 
2201 // ----||-
2202 ConstTensor5View Tensor7View::operator()
2203  ( const Range& l,
2204  const Range& v, const Range& s, const Range& b,
2205  Index p, Index r, const Range& c) const
2206 {
2207  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2208 }
2209 // |---||-
2210 ConstTensor4View Tensor7View::operator()
2211  ( Index l,
2212  const Range& v, const Range& s, const Range& b,
2213  Index p, Index r, const Range& c) const
2214 {
2215  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2216 }
2217 
2218 // ---|-|-
2219 ConstTensor5View Tensor7View::operator()
2220  ( const Range& l,
2221  const Range& v, const Range& s, Index b,
2222  const Range& p, Index r, const Range& c) const
2223 {
2224  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2225 }
2226 // |--|-|-
2227 ConstTensor4View Tensor7View::operator()
2228  ( Index l,
2229  const Range& v, const Range& s, Index b,
2230  const Range& p, Index r, const Range& c) const
2231 {
2232  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2233 }
2234 
2235 // --|--|-
2236 ConstTensor5View Tensor7View::operator()
2237  ( const Range& l,
2238  const Range& v, Index s, const Range& b,
2239  const Range& p, Index r, const Range& c) const
2240 {
2241  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2242 }
2243 // |-|--|-
2244 ConstTensor4View Tensor7View::operator()
2245  ( Index l,
2246  const Range& v, Index s, const Range& b,
2247  const Range& p, Index r, const Range& c) const
2248 {
2249  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2250 }
2251 
2252 // -|---|-
2253 ConstTensor5View Tensor7View::operator()
2254  ( const Range& l,
2255  Index v, const Range& s, const Range& b,
2256  const Range& p, Index r, const Range& c) const
2257 {
2258  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2259 }
2260 // ||---|-
2261 ConstTensor4View Tensor7View::operator()
2262  ( Index l,
2263  Index v, const Range& s, const Range& b,
2264  const Range& p, Index r, const Range& c) const
2265 {
2266  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2267 }
2268 
2269 // ---||--
2270 ConstTensor5View Tensor7View::operator()
2271  ( const Range& l,
2272  const Range& v, const Range& s, Index b,
2273  Index p, const Range& r, const Range& c) const
2274 {
2275  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2276 }
2277 // |--||--
2278 ConstTensor4View Tensor7View::operator()
2279  ( Index l,
2280  const Range& v, const Range& s, Index b,
2281  Index p, const Range& r, const Range& c) const
2282 {
2283  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2284 }
2285 
2286 // --|-|--
2287 ConstTensor5View Tensor7View::operator()
2288  ( const Range& l,
2289  const Range& v, Index s, const Range& b,
2290  Index p, const Range& r, const Range& c) const
2291 {
2292  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2293 }
2294 // |-|-|--
2295 ConstTensor4View Tensor7View::operator()
2296  ( Index l,
2297  const Range& v, Index s, const Range& b,
2298  Index p, const Range& r, const Range& c) const
2299 {
2300  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2301 }
2302 
2303 // -|--|--
2304 ConstTensor5View Tensor7View::operator()
2305  ( const Range& l,
2306  Index v, const Range& s, const Range& b,
2307  Index p, const Range& r, const Range& c) const
2308 {
2309  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2310 }
2311 // ||--|--
2312 ConstTensor4View Tensor7View::operator()
2313  ( Index l,
2314  Index v, const Range& s, const Range& b,
2315  Index p, const Range& r, const Range& c) const
2316 {
2317  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2318 }
2319 
2320 // --||---
2321 ConstTensor5View Tensor7View::operator()
2322  ( const Range& l,
2323  const Range& v, Index s, Index b,
2324  const Range& p, const Range& r, const Range& c) const
2325 {
2326  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2327 }
2328 // |-||---
2329 ConstTensor4View Tensor7View::operator()
2330  ( Index l,
2331  const Range& v, Index s, Index b,
2332  const Range& p, const Range& r, const Range& c) const
2333 {
2334  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2335 }
2336 
2337 // -|-|---
2338 ConstTensor5View Tensor7View::operator()
2339  ( const Range& l,
2340  Index v, const Range& s, Index b,
2341  const Range& p, const Range& r, const Range& c) const
2342 {
2343  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2344 }
2345 // ||-|---
2346 ConstTensor4View Tensor7View::operator()
2347  ( Index l,
2348  Index v, const Range& s, Index b,
2349  const Range& p, const Range& r, const Range& c) const
2350 {
2351  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2352 }
2353 
2354 // -||----
2355 ConstTensor5View Tensor7View::operator()
2356  ( const Range& l,
2357  Index v, Index s, const Range& b,
2358  const Range& p, const Range& r, const Range& c) const
2359 {
2360  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2361 }
2362 // |||----
2363 ConstTensor4View Tensor7View::operator()
2364  ( Index l,
2365  Index v, Index s, const Range& b,
2366  const Range& p, const Range& r, const Range& c) const
2367 {
2368  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2369 }
2370 
2371 // ----|||
2372 ConstTensor4View Tensor7View::operator()
2373  ( const Range& l,
2374  const Range& v, const Range& s, const Range& b,
2375  Index p, Index r, Index c) const
2376 {
2377  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2378 }
2379 // |---|||
2380 ConstTensor3View Tensor7View::operator()
2381  ( Index l,
2382  const Range& v, const Range& s, const Range& b,
2383  Index p, Index r, Index c) const
2384 {
2385  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2386 }
2387 
2388 // ---|-||
2389 ConstTensor4View Tensor7View::operator()
2390  ( const Range& l,
2391  const Range& v, const Range& s, Index b,
2392  const Range& p, Index r, Index c) const
2393 {
2394  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2395 }
2396 // |--|-||
2397 ConstTensor3View Tensor7View::operator()
2398  ( Index l,
2399  const Range& v, const Range& s, Index b,
2400  const Range& p, Index r, Index c) const
2401 {
2402  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2403 }
2404 
2405 // --|--||
2406 ConstTensor4View Tensor7View::operator()
2407  ( const Range& l,
2408  const Range& v, Index s, const Range& b,
2409  const Range& p, Index r, Index c) const
2410 {
2411  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2412 }
2413 // |-|--||
2414 ConstTensor3View Tensor7View::operator()
2415  ( Index l,
2416  const Range& v, Index s, const Range& b,
2417  const Range& p, Index r, Index c) const
2418 {
2419  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2420 }
2421 
2422 // -|---||
2423 ConstTensor4View Tensor7View::operator()
2424  ( const Range& l,
2425  Index v, const Range& s, const Range& b,
2426  const Range& p, Index r, Index c) const
2427 {
2428  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2429 }
2430 // ||---||
2431 ConstTensor3View Tensor7View::operator()
2432  ( Index l,
2433  Index v, const Range& s, const Range& b,
2434  const Range& p, Index r, Index c) const
2435 {
2436  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2437 }
2438 
2439 // ---||-|
2440 ConstTensor4View Tensor7View::operator()
2441  ( const Range& l,
2442  const Range& v, const Range& s, Index b,
2443  Index p, const Range& r, Index c) const
2444 {
2445  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2446 }
2447 // |--||-|
2448 ConstTensor3View Tensor7View::operator()
2449  ( Index l,
2450  const Range& v, const Range& s, Index b,
2451  Index p, const Range& r, Index c) const
2452 {
2453  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2454 }
2455 
2456 // --|-|-|
2457 ConstTensor4View Tensor7View::operator()
2458  ( const Range& l,
2459  const Range& v, Index s, const Range& b,
2460  Index p, const Range& r, Index c) const
2461 {
2462  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2463 }
2464 // |-|-|-|
2465 ConstTensor3View Tensor7View::operator()
2466  ( Index l,
2467  const Range& v, Index s, const Range& b,
2468  Index p, const Range& r, Index c) const
2469 {
2470  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2471 }
2472 
2473 // -|--|-|
2474 ConstTensor4View Tensor7View::operator()
2475  ( const Range& l,
2476  Index v, const Range& s, const Range& b,
2477  Index p, const Range& r, Index c) const
2478 {
2479  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2480 }
2481 // ||--|-|
2482 ConstTensor3View Tensor7View::operator()
2483  ( Index l,
2484  Index v, const Range& s, const Range& b,
2485  Index p, const Range& r, Index c) const
2486 {
2487  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2488 }
2489 
2490 // --||--|
2491 ConstTensor4View Tensor7View::operator()
2492  ( const Range& l,
2493  const Range& v, Index s, Index b,
2494  const Range& p, const Range& r, Index c) const
2495 {
2496  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2497 }
2498 // |-||--|
2499 ConstTensor3View Tensor7View::operator()
2500  ( Index l,
2501  const Range& v, Index s, Index b,
2502  const Range& p, const Range& r, Index c) const
2503 {
2504  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2505 }
2506 
2507 // -|-|--|
2508 ConstTensor4View Tensor7View::operator()
2509  ( const Range& l,
2510  Index v, const Range& s, Index b,
2511  const Range& p, const Range& r, Index c) const
2512 {
2513  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2514 }
2515 // ||-|--|
2516 ConstTensor3View Tensor7View::operator()
2517  ( Index l,
2518  Index v, const Range& s, Index b,
2519  const Range& p, const Range& r, Index c) const
2520 {
2521  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2522 }
2523 
2524 // -||---|
2525 ConstTensor4View Tensor7View::operator()
2526  ( const Range& l,
2527  Index v, Index s, const Range& b,
2528  const Range& p, const Range& r, Index c) const
2529 {
2530  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2531 }
2532 // |||---|
2533 ConstTensor3View Tensor7View::operator()
2534  ( Index l,
2535  Index v, Index s, const Range& b,
2536  const Range& p, const Range& r, Index c) const
2537 {
2538  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2539 }
2540 
2541 // ---|||-
2542 ConstTensor4View Tensor7View::operator()
2543  ( const Range& l,
2544  const Range& v, const Range& s, Index b,
2545  Index p, Index r, const Range& c) const
2546 {
2547  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2548 }
2549 // |--|||-
2550 ConstTensor3View Tensor7View::operator()
2551  ( Index l,
2552  const Range& v, const Range& s, Index b,
2553  Index p, Index r, const Range& c) const
2554 {
2555  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2556 }
2557 
2558 // --|-||-
2559 ConstTensor4View Tensor7View::operator()
2560  ( const Range& l,
2561  const Range& v, Index s, const Range& b,
2562  Index p, Index r, const Range& c) const
2563 {
2564  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2565 }
2566 // |-|-||-
2567 ConstTensor3View Tensor7View::operator()
2568  ( Index l,
2569  const Range& v, Index s, const Range& b,
2570  Index p, Index r, const Range& c) const
2571 {
2572  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2573 }
2574 
2575 // -|--||-
2576 ConstTensor4View Tensor7View::operator()
2577  ( const Range& l,
2578  Index v, const Range& s, const Range& b,
2579  Index p, Index r, const Range& c) const
2580 {
2581  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2582 }
2583 // ||--||-
2584 ConstTensor3View Tensor7View::operator()
2585  ( Index l,
2586  Index v, const Range& s, const Range& b,
2587  Index p, Index r, const Range& c) const
2588 {
2589  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2590 }
2591 
2592 // --||-|-
2593 ConstTensor4View Tensor7View::operator()
2594  ( const Range& l,
2595  const Range& v, Index s, Index b,
2596  const Range& p, Index r, const Range& c) const
2597 {
2598  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2599 }
2600 // |-||-|-
2601 ConstTensor3View Tensor7View::operator()
2602  ( Index l,
2603  const Range& v, Index s, Index b,
2604  const Range& p, Index r, const Range& c) const
2605 {
2606  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2607 }
2608 
2609 // -|-|-|-
2610 ConstTensor4View Tensor7View::operator()
2611  ( const Range& l,
2612  Index v, const Range& s, Index b,
2613  const Range& p, Index r, const Range& c) const
2614 {
2615  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2616 }
2617 // ||-|-|-
2618 ConstTensor3View Tensor7View::operator()
2619  ( Index l,
2620  Index v, const Range& s, Index b,
2621  const Range& p, Index r, const Range& c) const
2622 {
2623  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2624 }
2625 
2626 // -||--|-
2627 ConstTensor4View Tensor7View::operator()
2628  ( const Range& l,
2629  Index v, Index s, const Range& b,
2630  const Range& p, Index r, const Range& c) const
2631 {
2632  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2633 }
2634 // |||--|-
2635 ConstTensor3View Tensor7View::operator()
2636  ( Index l,
2637  Index v, Index s, const Range& b,
2638  const Range& p, Index r, const Range& c) const
2639 {
2640  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2641 }
2642 
2643 // --|||--
2644 ConstTensor4View Tensor7View::operator()
2645  ( const Range& l,
2646  const Range& v, Index s, Index b,
2647  Index p, const Range& r, const Range& c) const
2648 {
2649  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2650 }
2651 // |-|||--
2652 ConstTensor3View Tensor7View::operator()
2653  ( Index l,
2654  const Range& v, Index s, Index b,
2655  Index p, const Range& r, const Range& c) const
2656 {
2657  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2658 }
2659 
2660 // -|-||--
2661 ConstTensor4View Tensor7View::operator()
2662  ( const Range& l,
2663  Index v, const Range& s, Index b,
2664  Index p, const Range& r, const Range& c) const
2665 {
2666  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2667 }
2668 // ||-||--
2669 ConstTensor3View Tensor7View::operator()
2670  ( Index l,
2671  Index v, const Range& s, Index b,
2672  Index p, const Range& r, const Range& c) const
2673 {
2674  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2675 }
2676 
2677 // -||-|--
2678 ConstTensor4View Tensor7View::operator()
2679  ( const Range& l,
2680  Index v, Index s, const Range& b,
2681  Index p, const Range& r, const Range& c) const
2682 {
2683  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2684 }
2685 // |||-|--
2686 ConstTensor3View Tensor7View::operator()
2687  ( Index l,
2688  Index v, Index s, const Range& b,
2689  Index p, const Range& r, const Range& c) const
2690 {
2691  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2692 }
2693 
2694 // -|||---
2695 ConstTensor4View Tensor7View::operator()
2696  ( const Range& l,
2697  Index v, Index s, Index b,
2698  const Range& p, const Range& r, const Range& c) const
2699 {
2700  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2701 }
2702 // ||||---
2703 ConstTensor3View Tensor7View::operator()
2704  ( Index l,
2705  Index v, Index s, Index b,
2706  const Range& p, const Range& r, const Range& c) const
2707 {
2708  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2709 }
2710 
2711 // -||||--
2712 ConstTensor3View Tensor7View::operator()
2713  ( const Range& l,
2714  Index v, Index s, Index b,
2715  Index p, const Range& r, const Range& c) const
2716 {
2717  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2718 }
2719 // |||||--
2720 ConstMatrixView Tensor7View::operator()
2721  ( Index l,
2722  Index v, Index s, Index b,
2723  Index p, const Range& r, const Range& c) const
2724 {
2725  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2726 }
2727 
2728 // -|||-|-
2729 ConstTensor3View Tensor7View::operator()
2730  ( const Range& l,
2731  Index v, Index s, Index b,
2732  const Range& p, Index r, const Range& c) const
2733 {
2734  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2735 }
2736 // ||||-|-
2737 ConstMatrixView Tensor7View::operator()
2738  ( Index l,
2739  Index v, Index s, Index b,
2740  const Range& p, Index r, const Range& c) const
2741 {
2742  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2743 }
2744 
2745 // -||-||-
2746 ConstTensor3View Tensor7View::operator()
2747  ( const Range& l,
2748  Index v, Index s, const Range& b,
2749  Index p, Index r, const Range& c) const
2750 {
2751  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2752 }
2753 // |||-||-
2754 ConstMatrixView Tensor7View::operator()
2755  ( Index l,
2756  Index v, Index s, const Range& b,
2757  Index p, Index r, const Range& c) const
2758 {
2759  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2760 }
2761 
2762 // -|-|||-
2763 ConstTensor3View Tensor7View::operator()
2764  ( const Range& l,
2765  Index v, const Range& s, Index b,
2766  Index p, Index r, const Range& c) const
2767 {
2768  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2769 }
2770 // ||-|||-
2771 ConstMatrixView Tensor7View::operator()
2772  ( Index l,
2773  Index v, const Range& s, Index b,
2774  Index p, Index r, const Range& c) const
2775 {
2776  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2777 }
2778 
2779 // --||||-
2780 ConstTensor3View Tensor7View::operator()
2781  ( const Range& l,
2782  const Range& v, Index s, Index b,
2783  Index p, Index r, const Range& c) const
2784 {
2785  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2786 }
2787 // |-||||-
2788 ConstMatrixView Tensor7View::operator()
2789  ( Index l,
2790  const Range& v, Index s, Index b,
2791  Index p, Index r, const Range& c) const
2792 {
2793  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2794 }
2795 
2796 // -|||--|
2797 ConstTensor3View Tensor7View::operator()
2798  ( const Range& l,
2799  Index v, Index s, Index b,
2800  const Range& p, const Range& r, Index c) const
2801 {
2802  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2803 }
2804 // ||||--|
2805 ConstMatrixView Tensor7View::operator()
2806  ( Index l,
2807  Index v, Index s, Index b,
2808  const Range& p, const Range& r, Index c) const
2809 {
2810  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2811 }
2812 
2813 // -||-|-|
2814 ConstTensor3View Tensor7View::operator()
2815  ( const Range& l,
2816  Index v, Index s, const Range& b,
2817  Index p, const Range& r, Index c) const
2818 {
2819  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2820 }
2821 // |||-|-|
2822 ConstMatrixView Tensor7View::operator()
2823  ( Index l,
2824  Index v, Index s, const Range& b,
2825  Index p, const Range& r, Index c) const
2826 {
2827  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2828 }
2829 
2830 // -|-||-|
2831 ConstTensor3View Tensor7View::operator()
2832  ( const Range& l,
2833  Index v, const Range& s, Index b,
2834  Index p, const Range& r, Index c) const
2835 {
2836  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2837 }
2838 // ||-||-|
2839 ConstMatrixView Tensor7View::operator()
2840  ( Index l,
2841  Index v, const Range& s, Index b,
2842  Index p, const Range& r, Index c) const
2843 {
2844  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2845 }
2846 
2847 // --|||-|
2848 ConstTensor3View Tensor7View::operator()
2849  ( const Range& l,
2850  const Range& v, Index s, Index b,
2851  Index p, const Range& r, Index c) const
2852 {
2853  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2854 }
2855 // |-|||-|
2856 ConstMatrixView Tensor7View::operator()
2857  ( Index l,
2858  const Range& v, Index s, Index b,
2859  Index p, const Range& r, Index c) const
2860 {
2861  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2862 }
2863 
2864 // -||--||
2865 ConstTensor3View Tensor7View::operator()
2866  ( const Range& l,
2867  Index v, Index s, const Range& b,
2868  const Range& p, Index r, Index c) const
2869 {
2870  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2871 }
2872 // |||--||
2873 ConstMatrixView Tensor7View::operator()
2874  ( Index l,
2875  Index v, Index s, const Range& b,
2876  const Range& p, Index r, Index c) const
2877 {
2878  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2879 }
2880 
2881 // -|-|-||
2882 ConstTensor3View Tensor7View::operator()
2883  ( const Range& l,
2884  Index v, const Range& s, Index b,
2885  const Range& p, Index r, Index c) const
2886 {
2887  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2888 }
2889 // ||-|-||
2890 ConstMatrixView Tensor7View::operator()
2891  ( Index l,
2892  Index v, const Range& s, Index b,
2893  const Range& p, Index r, Index c) const
2894 {
2895  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2896 }
2897 
2898 // --||-||
2899 ConstTensor3View Tensor7View::operator()
2900  ( const Range& l,
2901  const Range& v, Index s, Index b,
2902  const Range& p, Index r, Index c) const
2903 {
2904  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2905 }
2906 // |-||-||
2907 ConstMatrixView Tensor7View::operator()
2908  ( Index l,
2909  const Range& v, Index s, Index b,
2910  const Range& p, Index r, Index c) const
2911 {
2912  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2913 }
2914 
2915 // -|--|||
2916 ConstTensor3View Tensor7View::operator()
2917  ( const Range& l,
2918  Index v, const Range& s, const Range& b,
2919  Index p, Index r, Index c) const
2920 {
2921  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2922 }
2923 // ||--|||
2924 ConstMatrixView Tensor7View::operator()
2925  ( Index l,
2926  Index v, const Range& s, const Range& b,
2927  Index p, Index r, Index c) const
2928 {
2929  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2930 }
2931 
2932 // --|-|||
2933 ConstTensor3View Tensor7View::operator()
2934  ( const Range& l,
2935  const Range& v, Index s, const Range& b,
2936  Index p, Index r, Index c) const
2937 {
2938  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2939 }
2940 // |-|-|||
2941 ConstMatrixView Tensor7View::operator()
2942  ( Index l,
2943  const Range& v, Index s, const Range& b,
2944  Index p, Index r, Index c) const
2945 {
2946  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2947 }
2948 
2949 // ---||||
2950 ConstTensor3View Tensor7View::operator()
2951  ( const Range& l,
2952  const Range& v, const Range& s, Index b,
2953  Index p, Index r, Index c) const
2954 {
2955  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2956 }
2957 // |--||||
2958 ConstMatrixView Tensor7View::operator()
2959  ( Index l,
2960  const Range& v, const Range& s, Index b,
2961  Index p, Index r, Index c) const
2962 {
2963  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2964 }
2965 
2966 // -|||||-
2967 ConstMatrixView Tensor7View::operator()
2968  ( const Range& l,
2969  Index v, Index s, Index b,
2970  Index p, Index r, const Range& c) const
2971 {
2972  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2973 }
2974 // ||||||-
2975 ConstVectorView Tensor7View::operator()
2976  ( Index l,
2977  Index v, Index s, Index b,
2978  Index p, Index r, const Range& c) const
2979 {
2980  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2981 }
2982 
2983 // -||||-|
2984 ConstMatrixView Tensor7View::operator()
2985  ( const Range& l,
2986  Index v, Index s, Index b,
2987  Index p, const Range& r, Index c) const
2988 {
2989  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2990 }
2991 // |||||-|
2992 ConstVectorView Tensor7View::operator()
2993  ( Index l,
2994  Index v, Index s, Index b,
2995  Index p, const Range& r, Index c) const
2996 {
2997  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
2998 }
2999 
3000 // -|||-||
3001 ConstMatrixView Tensor7View::operator()
3002  ( const Range& l,
3003  Index v, Index s, Index b,
3004  const Range& p, Index r, Index c) const
3005 {
3006  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3007 }
3008 // ||||-||
3009 ConstVectorView Tensor7View::operator()
3010  ( Index l,
3011  Index v, Index s, Index b,
3012  const Range& p, Index r, Index c) const
3013 {
3014  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3015 }
3016 
3017 // -||-|||
3018 ConstMatrixView Tensor7View::operator()
3019  ( const Range& l,
3020  Index v, Index s, const Range& b,
3021  Index p, Index r, Index c) const
3022 {
3023  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3024 }
3025 // |||-|||
3026 ConstVectorView Tensor7View::operator()
3027  ( Index l,
3028  Index v, Index s, const Range& b,
3029  Index p, Index r, Index c) const
3030 {
3031  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3032 }
3033 
3034 // -|-||||
3035 ConstMatrixView Tensor7View::operator()
3036  ( const Range& l,
3037  Index v, const Range& s, Index b,
3038  Index p, Index r, Index c) const
3039 {
3040  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3041 }
3042 // ||-||||
3043 ConstVectorView Tensor7View::operator()
3044  ( Index l,
3045  Index v, const Range& s, Index b,
3046  Index p, Index r, Index c) const
3047 {
3048  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3049 }
3050 
3051 // --|||||
3052 ConstMatrixView Tensor7View::operator()
3053  ( const Range& l,
3054  const Range& v, Index s, Index b,
3055  Index p, Index r, Index c) const
3056 {
3057  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3058 }
3059 // |-|||||
3060 ConstVectorView Tensor7View::operator()
3061  ( Index l,
3062  const Range& v, Index s, Index b,
3063  Index p, Index r, Index c) const
3064 {
3065  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3066 }
3067 
3068 // -||||||
3069 ConstVectorView Tensor7View::operator()
3070  ( const Range& l,
3071  Index v, Index s, Index b,
3072  Index p, Index r, Index c) const
3073 {
3074  return ConstTensor7View::operator()(l,v,s,b,p,r,c);
3075 }
3076 
3077 // Non-const index operators:
3078 
3079 // -------
3080 Tensor7View Tensor7View::operator()
3081  ( const Range& l,
3082  const Range& v, const Range& s, const Range& b,
3083  const Range& p, const Range& r, const Range& c)
3084 {
3085  return Tensor7View(mdata,
3086  mlr, mvr, msr, mbr, mpr, mrr, mcr,
3087  l, v, s, b, p, r, c);
3088 }
3089 // |------
3090 Tensor6View Tensor7View::operator()
3091  ( Index l,
3092  const Range& v, const Range& s, const Range& b,
3093  const Range& p, const Range& r, const Range& c)
3094 {
3095  CHECK(l);
3096  return Tensor6View(mdata + OFFSET(l),
3097  mvr, msr, mbr, mpr, mrr, mcr,
3098  v, s, b, p, r, c);
3099 }
3100 
3101 // ------|
3102 Tensor6View Tensor7View::operator()
3103  ( const Range& l,
3104  const Range& v, const Range& s, const Range& b,
3105  const Range& p, const Range& r, Index c)
3106 {
3107  CHECK(c);
3108  return Tensor6View(mdata + OFFSET(c),
3109  mlr, mvr, msr, mbr, mpr, mrr,
3110  l, v, s, b, p, r);
3111 }
3112 // |-----|
3113 Tensor5View Tensor7View::operator()
3114  ( Index l,
3115  const Range& v, const Range& s, const Range& b,
3116  const Range& p, const Range& r, Index c)
3117 {
3118  CHECK(l);
3119  CHECK(c);
3120  return Tensor5View(mdata + OFFSET(l) + OFFSET(c),
3121  mvr, msr, mbr, mpr, mrr,
3122  v, s, b, p, r);
3123 }
3124 
3125 // -----|-
3126 Tensor6View Tensor7View::operator()
3127  ( const Range& l,
3128  const Range& v, const Range& s, const Range& b,
3129  const Range& p, Index r, const Range& c)
3130 {
3131  CHECK(r);
3132  return Tensor6View(mdata + OFFSET(r),
3133  mlr, mvr, msr, mbr, mpr, mcr,
3134  l, v, s, b, p, c);
3135 }
3136 // |----|-
3137 Tensor5View Tensor7View::operator()
3138  ( Index l,
3139  const Range& v, const Range& s, const Range& b,
3140  const Range& p, Index r, const Range& c)
3141 {
3142  CHECK(l);
3143  CHECK(r);
3144  return Tensor5View(mdata + OFFSET(l) + OFFSET(r),
3145  mvr, msr, mbr, mpr, mcr,
3146  v, s, b, p, c);
3147 }
3148 
3149 // ----|--
3150 Tensor6View Tensor7View::operator()
3151  ( const Range& l,
3152  const Range& v, const Range& s, const Range& b,
3153  Index p, const Range& r, const Range& c)
3154 {
3155  CHECK(p);
3156  return Tensor6View(mdata + OFFSET(p),
3157  mlr, mvr, msr, mbr, mrr, mcr,
3158  l, v, s, b, r, c);
3159 }
3160 // |---|--
3161 Tensor5View Tensor7View::operator()
3162  ( Index l,
3163  const Range& v, const Range& s, const Range& b,
3164  Index p, const Range& r, const Range& c)
3165 {
3166  CHECK(l);
3167  CHECK(p);
3168  return Tensor5View(mdata + OFFSET(l) + OFFSET(p),
3169  mvr, msr, mbr, mrr, mcr,
3170  v, s, b, r, c);
3171 }
3172 
3173 // ---|---
3174 Tensor6View Tensor7View::operator()
3175  ( const Range& l,
3176  const Range& v, const Range& s, Index b,
3177  const Range& p, const Range& r, const Range& c)
3178 {
3179  CHECK(b);
3180  return Tensor6View(mdata + OFFSET(b),
3181  mlr, mvr, msr, mpr, mrr, mcr,
3182  l, v, s, p, r, c);
3183 }
3184 // |--|---
3185 Tensor5View Tensor7View::operator()
3186  ( Index l,
3187  const Range& v, const Range& s, Index b,
3188  const Range& p, const Range& r, const Range& c)
3189 {
3190  CHECK(l);
3191  CHECK(b);
3192  return Tensor5View(mdata + OFFSET(l) + OFFSET(b),
3193  mvr, msr, mpr, mrr, mcr,
3194  v, s, p, r, c);
3195 }
3196 
3197 // --|----
3198 Tensor6View Tensor7View::operator()
3199  ( const Range& l,
3200  const Range& v, Index s, const Range& b,
3201  const Range& p, const Range& r, const Range& c)
3202 {
3203  CHECK(s);
3204  return Tensor6View(mdata + OFFSET(s),
3205  mlr, mvr, mbr, mpr, mrr, mcr,
3206  l, v, b, p, r, c);
3207 }
3208 // |-|----
3209 Tensor5View Tensor7View::operator()
3210  ( Index l,
3211  const Range& v, Index s, const Range& b,
3212  const Range& p, const Range& r, const Range& c)
3213 {
3214  CHECK(l);
3215  CHECK(s);
3216  return Tensor5View(mdata + OFFSET(l) + OFFSET(s),
3217  mvr, mbr, mpr, mrr, mcr,
3218  v, b, p, r, c);
3219 }
3220 
3221 // -|-----
3222 Tensor6View Tensor7View::operator()
3223  ( const Range& l,
3224  Index v, const Range& s, const Range& b,
3225  const Range& p, const Range& r, const Range& c)
3226 {
3227  CHECK(v);
3228  return Tensor6View(mdata + OFFSET(v),
3229  mlr, msr, mbr, mpr, mrr, mcr,
3230  l, s, b, p, r, c);
3231 }
3232 // ||-----
3233 Tensor5View Tensor7View::operator()
3234  ( Index l,
3235  Index v, const Range& s, const Range& b,
3236  const Range& p, const Range& r, const Range& c)
3237 {
3238  CHECK(l);
3239  CHECK(v);
3240  return Tensor5View(mdata + OFFSET(l) + OFFSET(v),
3241  msr, mbr, mpr, mrr, mcr,
3242  s, b, p, r, c);
3243 }
3244 
3245 // -----||
3246 Tensor5View Tensor7View::operator()
3247  ( const Range& l,
3248  const Range& v, const Range& s, const Range& b,
3249  const Range& p, Index r, Index c)
3250 {
3251  CHECK(r);
3252  CHECK(c);
3253  return Tensor5View(mdata + OFFSET(r) + OFFSET(c),
3254  mlr, mvr, msr, mbr, mpr,
3255  l, v, s, b, p );
3256 }
3257 // |----||
3258 Tensor4View Tensor7View::operator()
3259  ( Index l,
3260  const Range& v, const Range& s, const Range& b,
3261  const Range& p, Index r, Index c)
3262 {
3263  CHECK(l);
3264  CHECK(r);
3265  CHECK(c);
3266  return Tensor4View(mdata + OFFSET(l) + OFFSET(r) + OFFSET(c),
3267  mvr, msr, mbr, mpr,
3268  v, s, b, p );
3269 }
3270 
3271 // ----|-|
3272 Tensor5View Tensor7View::operator()
3273  ( const Range& l,
3274  const Range& v, const Range& s, const Range& b,
3275  Index p, const Range& r, Index c)
3276 {
3277  CHECK(p);
3278  CHECK(c);
3279  return Tensor5View(mdata + OFFSET(p) + OFFSET(c),
3280  mlr, mvr, msr, mbr, mrr,
3281  l, v, s, b, r );
3282 }
3283 // |---|-|
3284 Tensor4View Tensor7View::operator()
3285  ( Index l,
3286  const Range& v, const Range& s, const Range& b,
3287  Index p, const Range& r, Index c)
3288 {
3289  CHECK(l);
3290  CHECK(p);
3291  CHECK(c);
3292  return Tensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(c),
3293  mvr, msr, mbr, mrr,
3294  v, s, b, r );
3295 }
3296 
3297 // ---|--|
3298 Tensor5View Tensor7View::operator()
3299  ( const Range& l,
3300  const Range& v, const Range& s, Index b,
3301  const Range& p, const Range& r, Index c)
3302 {
3303  CHECK(b);
3304  CHECK(c);
3305  return Tensor5View(mdata + OFFSET(b) + OFFSET(c),
3306  mlr, mvr, msr, mpr, mrr,
3307  l, v, s, p, r );
3308 }
3309 // |--|--|
3310 Tensor4View Tensor7View::operator()
3311  ( Index l,
3312  const Range& v, const Range& s, Index b,
3313  const Range& p, const Range& r, Index c)
3314 {
3315  CHECK(l);
3316  CHECK(b);
3317  CHECK(c);
3318  return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(c),
3319  mvr, msr, mpr, mrr,
3320  v, s, p, r );
3321 }
3322 
3323 // --|---|
3324 Tensor5View Tensor7View::operator()
3325  ( const Range& l,
3326  const Range& v, Index s, const Range& b,
3327  const Range& p, const Range& r, Index c)
3328 {
3329  CHECK(s);
3330  CHECK(c);
3331  return Tensor5View(mdata + OFFSET(s) + OFFSET(c),
3332  mlr, mvr, mbr, mpr, mrr,
3333  l, v, b, p, r );
3334 }
3335 // |-|---|
3336 Tensor4View Tensor7View::operator()
3337  ( Index l,
3338  const Range& v, Index s, const Range& b,
3339  const Range& p, const Range& r, Index c)
3340 {
3341  CHECK(l);
3342  CHECK(s);
3343  CHECK(c);
3344  return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(c),
3345  mvr, mbr, mpr, mrr,
3346  v, b, p, r );
3347 }
3348 
3349 // -|----|
3350 Tensor5View Tensor7View::operator()
3351  ( const Range& l,
3352  Index v, const Range& s, const Range& b,
3353  const Range& p, const Range& r, Index c)
3354 {
3355  CHECK(v);
3356  CHECK(c);
3357  return Tensor5View(mdata + OFFSET(v) + OFFSET(c),
3358  mlr, msr, mbr, mpr, mrr,
3359  l, s, b, p, r );
3360 }
3361 // ||----|
3362 Tensor4View Tensor7View::operator()
3363  ( Index l,
3364  Index v, const Range& s, const Range& b,
3365  const Range& p, const Range& r, Index c)
3366 {
3367  CHECK(l);
3368  CHECK(v);
3369  CHECK(c);
3370  return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(c),
3371  msr, mbr, mpr, mrr,
3372  s, b, p, r );
3373 }
3374 
3375 // ----||-
3376 Tensor5View Tensor7View::operator()
3377  ( const Range& l,
3378  const Range& v, const Range& s, const Range& b,
3379  Index p, Index r, const Range& c)
3380 {
3381  CHECK(p);
3382  CHECK(r);
3383  return Tensor5View(mdata + OFFSET(p) + OFFSET(r),
3384  mlr, mvr, msr, mbr, mcr,
3385  l, v, s, b, c );
3386 }
3387 // |---||-
3388 Tensor4View Tensor7View::operator()
3389  ( Index l,
3390  const Range& v, const Range& s, const Range& b,
3391  Index p, Index r, const Range& c)
3392 {
3393  CHECK(l);
3394  CHECK(p);
3395  CHECK(r);
3396  return Tensor4View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r),
3397  mvr, msr, mbr, mcr,
3398  v, s, b, c );
3399 }
3400 
3401 // ---|-|-
3402 Tensor5View Tensor7View::operator()
3403  ( const Range& l,
3404  const Range& v, const Range& s, Index b,
3405  const Range& p, Index r, const Range& c)
3406 {
3407  CHECK(b);
3408  CHECK(r);
3409  return Tensor5View(mdata + OFFSET(b) + OFFSET(r),
3410  mlr, mvr, msr, mpr, mcr,
3411  l, v, s, p, c );
3412 }
3413 // |--|-|-
3414 Tensor4View Tensor7View::operator()
3415  ( Index l,
3416  const Range& v, const Range& s, Index b,
3417  const Range& p, Index r, const Range& c)
3418 {
3419  CHECK(l);
3420  CHECK(b);
3421  CHECK(r);
3422  return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r),
3423  mvr, msr, mpr, mcr,
3424  v, s, p, c );
3425 }
3426 
3427 // --|--|-
3428 Tensor5View Tensor7View::operator()
3429  ( const Range& l,
3430  const Range& v, Index s, const Range& b,
3431  const Range& p, Index r, const Range& c)
3432 {
3433  CHECK(s);
3434  CHECK(r);
3435  return Tensor5View(mdata + OFFSET(s) + OFFSET(r),
3436  mlr, mvr, mbr, mpr, mcr,
3437  l, v, b, p, c );
3438 }
3439 // |-|--|-
3440 Tensor4View Tensor7View::operator()
3441  ( Index l,
3442  const Range& v, Index s, const Range& b,
3443  const Range& p, Index r, const Range& c)
3444 {
3445  CHECK(l);
3446  CHECK(s);
3447  CHECK(r);
3448  return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r),
3449  mvr, mbr, mpr, mcr,
3450  v, b, p, c );
3451 }
3452 
3453 // -|---|-
3454 Tensor5View Tensor7View::operator()
3455  ( const Range& l,
3456  Index v, const Range& s, const Range& b,
3457  const Range& p, Index r, const Range& c)
3458 {
3459  CHECK(v);
3460  CHECK(r);
3461  return Tensor5View(mdata + OFFSET(v) + OFFSET(r),
3462  mlr, msr, mbr, mpr, mcr,
3463  l, s, b, p, c );
3464 }
3465 // ||---|-
3466 Tensor4View Tensor7View::operator()
3467  ( Index l,
3468  Index v, const Range& s, const Range& b,
3469  const Range& p, Index r, const Range& c)
3470 {
3471  CHECK(l);
3472  CHECK(v);
3473  CHECK(r);
3474  return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r),
3475  msr, mbr, mpr, mcr,
3476  s, b, p, c );
3477 }
3478 
3479 // ---||--
3480 Tensor5View Tensor7View::operator()
3481  ( const Range& l,
3482  const Range& v, const Range& s, Index b,
3483  Index p, const Range& r, const Range& c)
3484 {
3485  CHECK(b);
3486  CHECK(p);
3487  return Tensor5View(mdata + OFFSET(b) + OFFSET(p),
3488  mlr, mvr, msr, mrr, mcr,
3489  l, v, s, r, c );
3490 }
3491 // |--||--
3492 Tensor4View Tensor7View::operator()
3493  ( Index l,
3494  const Range& v, const Range& s, Index b,
3495  Index p, const Range& r, const Range& c)
3496 {
3497  CHECK(l);
3498  CHECK(b);
3499  CHECK(p);
3500  return Tensor4View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p),
3501  mvr, msr, mrr, mcr,
3502  v, s, r, c );
3503 }
3504 
3505 // --|-|--
3506 Tensor5View Tensor7View::operator()
3507  ( const Range& l,
3508  const Range& v, Index s, const Range& b,
3509  Index p, const Range& r, const Range& c)
3510 {
3511  CHECK(s);
3512  CHECK(p);
3513  return Tensor5View(mdata + OFFSET(s) + OFFSET(p),
3514  mlr, mvr, mbr, mrr, mcr,
3515  l, v, b, r, c );
3516 }
3517 // |-|-|--
3518 Tensor4View Tensor7View::operator()
3519  ( Index l,
3520  const Range& v, Index s, const Range& b,
3521  Index p, const Range& r, const Range& c)
3522 {
3523  CHECK(l);
3524  CHECK(s);
3525  CHECK(p);
3526  return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p),
3527  mvr, mbr, mrr, mcr,
3528  v, b, r, c );
3529 }
3530 
3531 // -|--|--
3532 Tensor5View Tensor7View::operator()
3533  ( const Range& l,
3534  Index v, const Range& s, const Range& b,
3535  Index p, const Range& r, const Range& c)
3536 {
3537  CHECK(v);
3538  CHECK(p);
3539  return Tensor5View(mdata + OFFSET(v) + OFFSET(p),
3540  mlr, msr, mbr, mrr, mcr,
3541  l, s, b, r, c );
3542 }
3543 // ||--|--
3544 Tensor4View Tensor7View::operator()
3545  ( Index l,
3546  Index v, const Range& s, const Range& b,
3547  Index p, const Range& r, const Range& c)
3548 {
3549  CHECK(l);
3550  CHECK(v);
3551  CHECK(p);
3552  return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p),
3553  msr, mbr, mrr, mcr,
3554  s, b, r, c );
3555 }
3556 
3557 // --||---
3558 Tensor5View Tensor7View::operator()
3559  ( const Range& l,
3560  const Range& v, Index s, Index b,
3561  const Range& p, const Range& r, const Range& c)
3562 {
3563  CHECK(s);
3564  CHECK(b);
3565  return Tensor5View(mdata + OFFSET(s) + OFFSET(b),
3566  mlr, mvr, mpr, mrr, mcr,
3567  l, v, p, r, c );
3568 }
3569 // |-||---
3570 Tensor4View Tensor7View::operator()
3571  ( Index l,
3572  const Range& v, Index s, Index b,
3573  const Range& p, const Range& r, const Range& c)
3574 {
3575  CHECK(l);
3576  CHECK(s);
3577  CHECK(b);
3578  return Tensor4View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b),
3579  mvr, mpr, mrr, mcr,
3580  v, p, r, c );
3581 }
3582 
3583 // -|-|---
3584 Tensor5View Tensor7View::operator()
3585  ( const Range& l,
3586  Index v, const Range& s, Index b,
3587  const Range& p, const Range& r, const Range& c)
3588 {
3589  CHECK(v);
3590  CHECK(b);
3591  return Tensor5View(mdata + OFFSET(v) + OFFSET(b),
3592  mlr, msr, mpr, mrr, mcr,
3593  l, s, p, r, c );
3594 }
3595 // ||-|---
3596 Tensor4View Tensor7View::operator()
3597  ( Index l,
3598  Index v, const Range& s, Index b,
3599  const Range& p, const Range& r, const Range& c)
3600 {
3601  CHECK(l);
3602  CHECK(v);
3603  CHECK(b);
3604  return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b),
3605  msr, mpr, mrr, mcr,
3606  s, p, r, c );
3607 }
3608 
3609 // -||----
3610 Tensor5View Tensor7View::operator()
3611  ( const Range& l,
3612  Index v, Index s, const Range& b,
3613  const Range& p, const Range& r, const Range& c)
3614 {
3615  CHECK(v);
3616  CHECK(s);
3617  return Tensor5View(mdata + OFFSET(v) + OFFSET(s),
3618  mlr, mbr, mpr, mrr, mcr,
3619  l, b, p, r, c );
3620 }
3621 // |||----
3622 Tensor4View Tensor7View::operator()
3623  ( Index l,
3624  Index v, Index s, const Range& b,
3625  const Range& p, const Range& r, const Range& c)
3626 {
3627  CHECK(l);
3628  CHECK(v);
3629  CHECK(s);
3630  return Tensor4View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s),
3631  mbr, mpr, mrr, mcr,
3632  b, p, r, c );
3633 }
3634 
3635 // ----|||
3636 Tensor4View Tensor7View::operator()
3637  ( const Range& l,
3638  const Range& v, const Range& s, const Range& b,
3639  Index p, Index r, Index c)
3640 {
3641  CHECK(p);
3642  CHECK(r);
3643  CHECK(c);
3644  return Tensor4View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
3645  mlr, mvr, msr, mbr,
3646  l, v, s, b );
3647 }
3648 // |---|||
3649 Tensor3View Tensor7View::operator()
3650  ( Index l,
3651  const Range& v, const Range& s, const Range& b,
3652  Index p, Index r, Index c)
3653 {
3654  CHECK(l);
3655  CHECK(p);
3656  CHECK(r);
3657  CHECK(c);
3658  return Tensor3View(mdata + OFFSET(l) + OFFSET(p) + OFFSET(r) + OFFSET(c),
3659  mvr, msr, mbr,
3660  v, s, b );
3661 }
3662 
3663 // ---|-||
3664 Tensor4View Tensor7View::operator()
3665  ( const Range& l,
3666  const Range& v, const Range& s, Index b,
3667  const Range& p, Index r, Index c)
3668 {
3669  CHECK(b);
3670  CHECK(r);
3671  CHECK(c);
3672  return Tensor4View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
3673  mlr, mvr, msr, mpr,
3674  l, v, s, p );
3675 }
3676 // |--|-||
3677 Tensor3View Tensor7View::operator()
3678  ( Index l,
3679  const Range& v, const Range& s, Index b,
3680  const Range& p, Index r, Index c)
3681 {
3682  CHECK(l);
3683  CHECK(b);
3684  CHECK(r);
3685  CHECK(c);
3686  return Tensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(r) + OFFSET(c),
3687  mvr, msr, mpr,
3688  v, s, p );
3689 }
3690 
3691 // --|--||
3692 Tensor4View Tensor7View::operator()
3693  ( const Range& l,
3694  const Range& v, Index s, const Range& b,
3695  const Range& p, Index r, Index c)
3696 {
3697  CHECK(s);
3698  CHECK(r);
3699  CHECK(c);
3700  return Tensor4View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
3701  mlr, mvr, mbr, mpr,
3702  l, v, b, p );
3703 }
3704 // |-|--||
3705 Tensor3View Tensor7View::operator()
3706  ( Index l,
3707  const Range& v, Index s, const Range& b,
3708  const Range& p, Index r, Index c)
3709 {
3710  CHECK(l);
3711  CHECK(s);
3712  CHECK(r);
3713  CHECK(c);
3714  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(r) + OFFSET(c),
3715  mvr, mbr, mpr,
3716  v, b, p );
3717 }
3718 
3719 // -|---||
3720 Tensor4View Tensor7View::operator()
3721  ( const Range& l,
3722  Index v, const Range& s, const Range& b,
3723  const Range& p, Index r, Index c)
3724 {
3725  CHECK(v);
3726  CHECK(r);
3727  CHECK(c);
3728  return Tensor4View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
3729  mlr, msr, mbr, mpr,
3730  l, s, b, p );
3731 }
3732 // ||---||
3733 Tensor3View Tensor7View::operator()
3734  ( Index l,
3735  Index v, const Range& s, const Range& b,
3736  const Range& p, Index r, Index c)
3737 {
3738  CHECK(l);
3739  CHECK(v);
3740  CHECK(r);
3741  CHECK(c);
3742  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(r) + OFFSET(c),
3743  msr, mbr, mpr,
3744  s, b, p );
3745 }
3746 
3747 // ---||-|
3748 Tensor4View Tensor7View::operator()
3749  ( const Range& l,
3750  const Range& v, const Range& s, Index b,
3751  Index p, const Range& r, Index c)
3752 {
3753  CHECK(b);
3754  CHECK(p);
3755  CHECK(c);
3756  return Tensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
3757  mlr, mvr, msr, mrr,
3758  l, v, s, r );
3759 }
3760 // |--||-|
3761 Tensor3View Tensor7View::operator()
3762  ( Index l,
3763  const Range& v, const Range& s, Index b,
3764  Index p, const Range& r, Index c)
3765 {
3766  CHECK(l);
3767  CHECK(b);
3768  CHECK(p);
3769  CHECK(c);
3770  return Tensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(c),
3771  mvr, msr, mrr,
3772  v, s, r );
3773 }
3774 
3775 // --|-|-|
3776 Tensor4View Tensor7View::operator()
3777  ( const Range& l,
3778  const Range& v, Index s, const Range& b,
3779  Index p, const Range& r, Index c)
3780 {
3781  CHECK(s);
3782  CHECK(p);
3783  CHECK(c);
3784  return Tensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
3785  mlr, mvr, mbr, mrr,
3786  l, v, b, r );
3787 }
3788 // |-|-|-|
3789 Tensor3View Tensor7View::operator()
3790  ( Index l,
3791  const Range& v, Index s, const Range& b,
3792  Index p, const Range& r, Index c)
3793 {
3794  CHECK(l);
3795  CHECK(s);
3796  CHECK(p);
3797  CHECK(c);
3798  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(c),
3799  mvr, mbr, mrr,
3800  v, b, r );
3801 }
3802 
3803 // -|--|-|
3804 Tensor4View Tensor7View::operator()
3805  ( const Range& l,
3806  Index v, const Range& s, const Range& b,
3807  Index p, const Range& r, Index c)
3808 {
3809  CHECK(v);
3810  CHECK(p);
3811  CHECK(c);
3812  return Tensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
3813  mlr, msr, mbr, mrr,
3814  l, s, b, r );
3815 }
3816 // ||--|-|
3817 Tensor3View Tensor7View::operator()
3818  ( Index l,
3819  Index v, const Range& s, const Range& b,
3820  Index p, const Range& r, Index c)
3821 {
3822  CHECK(l);
3823  CHECK(v);
3824  CHECK(p);
3825  CHECK(c);
3826  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(c),
3827  msr, mbr, mrr,
3828  s, b, r );
3829 }
3830 
3831 // --||--|
3832 Tensor4View Tensor7View::operator()
3833  ( const Range& l,
3834  const Range& v, Index s, Index b,
3835  const Range& p, const Range& r, Index c)
3836 {
3837  CHECK(s);
3838  CHECK(b);
3839  CHECK(c);
3840  return Tensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
3841  mlr, mvr, mpr, mrr,
3842  l, v, p, r );
3843 }
3844 // |-||--|
3845 Tensor3View Tensor7View::operator()
3846  ( Index l,
3847  const Range& v, Index s, Index b,
3848  const Range& p, const Range& r, Index c)
3849 {
3850  CHECK(l);
3851  CHECK(s);
3852  CHECK(b);
3853  CHECK(c);
3854  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(c),
3855  mvr, mpr, mrr,
3856  v, p, r );
3857 }
3858 
3859 // -|-|--|
3860 Tensor4View Tensor7View::operator()
3861  ( const Range& l,
3862  Index v, const Range& s, Index b,
3863  const Range& p, const Range& r, Index c)
3864 {
3865  CHECK(v);
3866  CHECK(b);
3867  CHECK(c);
3868  return Tensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
3869  mlr, msr, mpr, mrr,
3870  l, s, p, r );
3871 }
3872 // ||-|--|
3873 Tensor3View Tensor7View::operator()
3874  ( Index l,
3875  Index v, const Range& s, Index b,
3876  const Range& p, const Range& r, Index c)
3877 {
3878  CHECK(l);
3879  CHECK(v);
3880  CHECK(b);
3881  CHECK(c);
3882  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(c),
3883  msr, mpr, mrr,
3884  s, p, r );
3885 }
3886 
3887 // -||---|
3888 Tensor4View Tensor7View::operator()
3889  ( const Range& l,
3890  Index v, Index s, const Range& b,
3891  const Range& p, const Range& r, Index c)
3892 {
3893  CHECK(v);
3894  CHECK(s);
3895  CHECK(c);
3896  return Tensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
3897  mlr, mbr, mpr, mrr,
3898  l, b, p, r );
3899 }
3900 // |||---|
3901 Tensor3View Tensor7View::operator()
3902  ( Index l,
3903  Index v, Index s, const Range& b,
3904  const Range& p, const Range& r, Index c)
3905 {
3906  CHECK(l);
3907  CHECK(v);
3908  CHECK(s);
3909  CHECK(c);
3910  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(c),
3911  mbr, mpr, mrr,
3912  b, p, r );
3913 }
3914 
3915 // ---|||-
3916 Tensor4View Tensor7View::operator()
3917  ( const Range& l,
3918  const Range& v, const Range& s, Index b,
3919  Index p, Index r, const Range& c)
3920 {
3921  CHECK(b);
3922  CHECK(p);
3923  CHECK(r);
3924  return Tensor4View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r),
3925  mlr, mvr, msr, mcr,
3926  l, v, s, c );
3927 }
3928 // |--|||-
3929 Tensor3View Tensor7View::operator()
3930  ( Index l,
3931  const Range& v, const Range& s, Index b,
3932  Index p, Index r, const Range& c)
3933 {
3934  CHECK(l);
3935  CHECK(b);
3936  CHECK(p);
3937  CHECK(r);
3938  return Tensor3View(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r),
3939  mvr, msr, mcr,
3940  v, s, c );
3941 }
3942 
3943 // --|-||-
3944 Tensor4View Tensor7View::operator()
3945  ( const Range& l,
3946  const Range& v, Index s, const Range& b,
3947  Index p, Index r, const Range& c)
3948 {
3949  CHECK(s);
3950  CHECK(p);
3951  CHECK(r);
3952  return Tensor4View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r),
3953  mlr, mvr, mbr, mcr,
3954  l, v, b, c );
3955 }
3956 // |-|-||-
3957 Tensor3View Tensor7View::operator()
3958  ( Index l,
3959  const Range& v, Index s, const Range& b,
3960  Index p, Index r, const Range& c)
3961 {
3962  CHECK(l);
3963  CHECK(s);
3964  CHECK(p);
3965  CHECK(r);
3966  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(r),
3967  mvr, mbr, mcr,
3968  v, b, c );
3969 }
3970 
3971 // -|--||-
3972 Tensor4View Tensor7View::operator()
3973  ( const Range& l,
3974  Index v, const Range& s, const Range& b,
3975  Index p, Index r, const Range& c)
3976 {
3977  CHECK(v);
3978  CHECK(p);
3979  CHECK(r);
3980  return Tensor4View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r),
3981  mlr, msr, mbr, mcr,
3982  l, s, b, c );
3983 }
3984 // ||--||-
3985 Tensor3View Tensor7View::operator()
3986  ( Index l,
3987  Index v, const Range& s, const Range& b,
3988  Index p, Index r, const Range& c)
3989 {
3990  CHECK(l);
3991  CHECK(v);
3992  CHECK(p);
3993  CHECK(r);
3994  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r),
3995  msr, mbr, mcr,
3996  s, b, c );
3997 }
3998 
3999 // --||-|-
4000 Tensor4View Tensor7View::operator()
4001  ( const Range& l,
4002  const Range& v, Index s, Index b,
4003  const Range& p, Index r, const Range& c)
4004 {
4005  CHECK(s);
4006  CHECK(b);
4007  CHECK(r);
4008  return Tensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r),
4009  mlr, mvr, mpr, mcr,
4010  l, v, p, c );
4011 }
4012 // |-||-|-
4013 Tensor3View Tensor7View::operator()
4014  ( Index l,
4015  const Range& v, Index s, Index b,
4016  const Range& p, Index r, const Range& c)
4017 {
4018  CHECK(l);
4019  CHECK(s);
4020  CHECK(b);
4021  CHECK(r);
4022  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r),
4023  mvr, mpr, mcr,
4024  v, p, c );
4025 }
4026 
4027 // -|-|-|-
4028 Tensor4View Tensor7View::operator()
4029  ( const Range& l,
4030  Index v, const Range& s, Index b,
4031  const Range& p, Index r, const Range& c)
4032 {
4033  CHECK(v);
4034  CHECK(b);
4035  CHECK(r);
4036  return Tensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r),
4037  mlr, msr, mpr, mcr,
4038  l, s, p, c );
4039 }
4040 // ||-|-|-
4041 Tensor3View Tensor7View::operator()
4042  ( Index l,
4043  Index v, const Range& s, Index b,
4044  const Range& p, Index r, const Range& c)
4045 {
4046  CHECK(l);
4047  CHECK(v);
4048  CHECK(b);
4049  CHECK(r);
4050  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r),
4051  msr, mpr, mcr,
4052  s, p, c );
4053 }
4054 
4055 // -||--|-
4056 Tensor4View Tensor7View::operator()
4057  ( const Range& l,
4058  Index v, Index s, const Range& b,
4059  const Range& p, Index r, const Range& c)
4060 {
4061  CHECK(v);
4062  CHECK(s);
4063  CHECK(r);
4064  return Tensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r),
4065  mlr, mbr, mpr, mcr,
4066  l, b, p, c );
4067 }
4068 // |||--|-
4069 Tensor3View Tensor7View::operator()
4070  ( Index l,
4071  Index v, Index s, const Range& b,
4072  const Range& p, Index r, const Range& c)
4073 {
4074  CHECK(l);
4075  CHECK(v);
4076  CHECK(s);
4077  CHECK(r);
4078  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r),
4079  mbr, mpr, mcr,
4080  b, p, c );
4081 }
4082 
4083 // --|||--
4084 Tensor4View Tensor7View::operator()
4085  ( const Range& l,
4086  const Range& v, Index s, Index b,
4087  Index p, const Range& r, const Range& c)
4088 {
4089  CHECK(s);
4090  CHECK(b);
4091  CHECK(p);
4092  return Tensor4View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p),
4093  mlr, mvr, mrr, mcr,
4094  l, v, r, c );
4095 }
4096 // |-|||--
4097 Tensor3View Tensor7View::operator()
4098  ( Index l,
4099  const Range& v, Index s, Index b,
4100  Index p, const Range& r, const Range& c)
4101 {
4102  CHECK(l);
4103  CHECK(s);
4104  CHECK(b);
4105  CHECK(p);
4106  return Tensor3View(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p),
4107  mvr, mrr, mcr,
4108  v, r, c );
4109 }
4110 
4111 // -|-||--
4112 Tensor4View Tensor7View::operator()
4113  ( const Range& l,
4114  Index v, const Range& s, Index b,
4115  Index p, const Range& r, const Range& c)
4116 {
4117  CHECK(v);
4118  CHECK(b);
4119  CHECK(p);
4120  return Tensor4View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p),
4121  mlr, msr, mrr, mcr,
4122  l, s, r, c );
4123 }
4124 // ||-||--
4125 Tensor3View Tensor7View::operator()
4126  ( Index l,
4127  Index v, const Range& s, Index b,
4128  Index p, const Range& r, const Range& c)
4129 {
4130  CHECK(l);
4131  CHECK(v);
4132  CHECK(b);
4133  CHECK(p);
4134  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p),
4135  msr, mrr, mcr,
4136  s, r, c );
4137 }
4138 
4139 // -||-|--
4140 Tensor4View Tensor7View::operator()
4141  ( const Range& l,
4142  Index v, Index s, const Range& b,
4143  Index p, const Range& r, const Range& c)
4144 {
4145  CHECK(v);
4146  CHECK(s);
4147  CHECK(p);
4148  return Tensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p),
4149  mlr, mbr, mrr, mcr,
4150  l, b, r, c );
4151 }
4152 // |||-|--
4153 Tensor3View Tensor7View::operator()
4154  ( Index l,
4155  Index v, Index s, const Range& b,
4156  Index p, const Range& r, const Range& c)
4157 {
4158  CHECK(l);
4159  CHECK(v);
4160  CHECK(s);
4161  CHECK(p);
4162  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p),
4163  mbr, mrr, mcr,
4164  b, r, c );
4165 }
4166 
4167 // -|||---
4168 Tensor4View Tensor7View::operator()
4169  ( const Range& l,
4170  Index v, Index s, Index b,
4171  const Range& p, const Range& r, const Range& c)
4172 {
4173  CHECK(v);
4174  CHECK(s);
4175  CHECK(b);
4176  return Tensor4View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b),
4177  mlr, mpr, mrr, mcr,
4178  l, p, r, c );
4179 }
4180 // ||||---
4181 Tensor3View Tensor7View::operator()
4182  ( Index l,
4183  Index v, Index s, Index b,
4184  const Range& p, const Range& r, const Range& c)
4185 {
4186  CHECK(l);
4187  CHECK(v);
4188  CHECK(s);
4189  CHECK(b);
4190  return Tensor3View(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b),
4191  mpr, mrr, mcr,
4192  p, r, c );
4193 }
4194 
4195 // -||||--
4196 Tensor3View Tensor7View::operator()
4197  ( const Range& l,
4198  Index v, Index s, Index b,
4199  Index p, const Range& r, const Range& c)
4200 {
4201  CHECK(v);
4202  CHECK(s);
4203  CHECK(b);
4204  CHECK(p);
4205  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
4206  mlr, mrr, mcr,
4207  l, r, c );
4208 }
4209 // |||||--
4210 MatrixView Tensor7View::operator()
4211  ( Index l,
4212  Index v, Index s, Index b,
4213  Index p, const Range& r, const Range& c)
4214 {
4215  CHECK(l);
4216  CHECK(v);
4217  CHECK(s);
4218  CHECK(b);
4219  CHECK(p);
4220  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
4221  mrr, mcr,
4222  r, c );
4223 }
4224 
4225 // -|||-|-
4226 Tensor3View Tensor7View::operator()
4227  ( const Range& l,
4228  Index v, Index s, Index b,
4229  const Range& p, Index r, const Range& c)
4230 {
4231  CHECK(v);
4232  CHECK(s);
4233  CHECK(b);
4234  CHECK(r);
4235  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
4236  mlr, mpr, mcr,
4237  l, p, c );
4238 }
4239 // ||||-|-
4240 MatrixView Tensor7View::operator()
4241  ( Index l,
4242  Index v, Index s, Index b,
4243  const Range& p, Index r, const Range& c)
4244 {
4245  CHECK(l);
4246  CHECK(v);
4247  CHECK(s);
4248  CHECK(b);
4249  CHECK(r);
4250  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
4251  mpr, mcr,
4252  p, c );
4253 }
4254 
4255 // -||-||-
4256 Tensor3View Tensor7View::operator()
4257  ( const Range& l,
4258  Index v, Index s, const Range& b,
4259  Index p, Index r, const Range& c)
4260 {
4261  CHECK(v);
4262  CHECK(s);
4263  CHECK(p);
4264  CHECK(r);
4265  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
4266  mlr, mbr, mcr,
4267  l, b, c );
4268 }
4269 // |||-||-
4270 MatrixView Tensor7View::operator()
4271  ( Index l,
4272  Index v, Index s, const Range& b,
4273  Index p, Index r, const Range& c)
4274 {
4275  CHECK(l);
4276  CHECK(v);
4277  CHECK(s);
4278  CHECK(p);
4279  CHECK(r);
4280  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
4281  mbr, mcr,
4282  b, c );
4283 }
4284 
4285 // -|-|||-
4286 Tensor3View Tensor7View::operator()
4287  ( const Range& l,
4288  Index v, const Range& s, Index b,
4289  Index p, Index r, const Range& c)
4290 {
4291  CHECK(v);
4292  CHECK(b);
4293  CHECK(p);
4294  CHECK(r);
4295  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4296  mlr, msr, mcr,
4297  l, s, c );
4298 }
4299 // ||-|||-
4300 MatrixView Tensor7View::operator()
4301  ( Index l,
4302  Index v, const Range& s, Index b,
4303  Index p, Index r, const Range& c)
4304 {
4305  CHECK(l);
4306  CHECK(v);
4307  CHECK(b);
4308  CHECK(p);
4309  CHECK(r);
4310  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4311  msr, mcr,
4312  s, c );
4313 }
4314 
4315 // --||||-
4316 Tensor3View Tensor7View::operator()
4317  ( const Range& l,
4318  const Range& v, Index s, Index b,
4319  Index p, Index r, const Range& c)
4320 {
4321  CHECK(s);
4322  CHECK(b);
4323  CHECK(p);
4324  CHECK(r);
4325  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4326  mlr, mvr, mcr,
4327  l, v, c );
4328 }
4329 // |-||||-
4330 MatrixView Tensor7View::operator()
4331  ( Index l,
4332  const Range& v, Index s, Index b,
4333  Index p, Index r, const Range& c)
4334 {
4335  CHECK(l);
4336  CHECK(s);
4337  CHECK(b);
4338  CHECK(p);
4339  CHECK(r);
4340  return MatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4341  mvr, mcr,
4342  v, c );
4343 }
4344 
4345 // -|||--|
4346 Tensor3View Tensor7View::operator()
4347  ( const Range& l,
4348  Index v, Index s, Index b,
4349  const Range& p, const Range& r, Index c)
4350 {
4351  CHECK(v);
4352  CHECK(s);
4353  CHECK(b);
4354  CHECK(c);
4355  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
4356  mlr, mpr, mrr,
4357  l, p, r );
4358 }
4359 // ||||--|
4360 MatrixView Tensor7View::operator()
4361  ( Index l,
4362  Index v, Index s, Index b,
4363  const Range& p, const Range& r, Index c)
4364 {
4365  CHECK(l);
4366  CHECK(v);
4367  CHECK(s);
4368  CHECK(b);
4369  CHECK(c);
4370  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
4371  mpr, mrr,
4372  p, r );
4373 }
4374 
4375 // -||-|-|
4376 Tensor3View Tensor7View::operator()
4377  ( const Range& l,
4378  Index v, Index s, const Range& b,
4379  Index p, const Range& r, Index c)
4380 {
4381  CHECK(v);
4382  CHECK(s);
4383  CHECK(p);
4384  CHECK(c);
4385  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
4386  mlr, mbr, mrr,
4387  l, b, r );
4388 }
4389 // |||-|-|
4390 MatrixView Tensor7View::operator()
4391  ( Index l,
4392  Index v, Index s, const Range& b,
4393  Index p, const Range& r, Index c)
4394 {
4395  CHECK(l);
4396  CHECK(v);
4397  CHECK(s);
4398  CHECK(p);
4399  CHECK(c);
4400  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
4401  mbr, mrr,
4402  b, r );
4403 }
4404 
4405 // -|-||-|
4406 Tensor3View Tensor7View::operator()
4407  ( const Range& l,
4408  Index v, const Range& s, Index b,
4409  Index p, const Range& r, Index c)
4410 {
4411  CHECK(v);
4412  CHECK(b);
4413  CHECK(p);
4414  CHECK(c);
4415  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4416  mlr, msr, mrr,
4417  l, s, r );
4418 }
4419 // ||-||-|
4420 MatrixView Tensor7View::operator()
4421  ( Index l,
4422  Index v, const Range& s, Index b,
4423  Index p, const Range& r, Index c)
4424 {
4425  CHECK(l);
4426  CHECK(v);
4427  CHECK(b);
4428  CHECK(p);
4429  CHECK(c);
4430  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4431  msr, mrr,
4432  s, r );
4433 }
4434 
4435 // --|||-|
4436 Tensor3View Tensor7View::operator()
4437  ( const Range& l,
4438  const Range& v, Index s, Index b,
4439  Index p, const Range& r, Index c)
4440 {
4441  CHECK(s);
4442  CHECK(b);
4443  CHECK(p);
4444  CHECK(c);
4445  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4446  mlr, mvr, mrr,
4447  l, v, r );
4448 }
4449 // |-|||-|
4450 MatrixView Tensor7View::operator()
4451  ( Index l,
4452  const Range& v, Index s, Index b,
4453  Index p, const Range& r, Index c)
4454 {
4455  CHECK(l);
4456  CHECK(s);
4457  CHECK(b);
4458  CHECK(p);
4459  CHECK(c);
4460  return MatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4461  mvr, mrr,
4462  v, r );
4463 }
4464 
4465 // -||--||
4466 Tensor3View Tensor7View::operator()
4467  ( const Range& l,
4468  Index v, Index s, const Range& b,
4469  const Range& p, Index r, Index c)
4470 {
4471  CHECK(v);
4472  CHECK(s);
4473  CHECK(r);
4474  CHECK(c);
4475  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
4476  mlr, mbr, mpr,
4477  l, b, p );
4478 }
4479 // |||--||
4480 MatrixView Tensor7View::operator()
4481  ( Index l,
4482  Index v, Index s, const Range& b,
4483  const Range& p, Index r, Index c)
4484 {
4485  CHECK(l);
4486  CHECK(v);
4487  CHECK(s);
4488  CHECK(r);
4489  CHECK(c);
4490  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
4491  mbr, mpr,
4492  b, p );
4493 }
4494 
4495 // -|-|-||
4496 Tensor3View Tensor7View::operator()
4497  ( const Range& l,
4498  Index v, const Range& s, Index b,
4499  const Range& p, Index r, Index c)
4500 {
4501  CHECK(v);
4502  CHECK(b);
4503  CHECK(r);
4504  CHECK(c);
4505  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4506  mlr, msr, mpr,
4507  l, s, p );
4508 }
4509 // ||-|-||
4510 MatrixView Tensor7View::operator()
4511  ( Index l,
4512  Index v, const Range& s, Index b,
4513  const Range& p, Index r, Index c)
4514 {
4515  CHECK(l);
4516  CHECK(v);
4517  CHECK(b);
4518  CHECK(r);
4519  CHECK(c);
4520  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4521  msr, mpr,
4522  s, p );
4523 }
4524 
4525 // --||-||
4526 Tensor3View Tensor7View::operator()
4527  ( const Range& l,
4528  const Range& v, Index s, Index b,
4529  const Range& p, Index r, Index c)
4530 {
4531  CHECK(s);
4532  CHECK(b);
4533  CHECK(r);
4534  CHECK(c);
4535  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4536  mlr, mvr, mpr,
4537  l, v, p );
4538 }
4539 // |-||-||
4540 MatrixView Tensor7View::operator()
4541  ( Index l,
4542  const Range& v, Index s, Index b,
4543  const Range& p, Index r, Index c)
4544 {
4545  CHECK(l);
4546  CHECK(s);
4547  CHECK(b);
4548  CHECK(r);
4549  CHECK(c);
4550  return MatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4551  mvr, mpr,
4552  v, p );
4553 }
4554 
4555 // -|--|||
4556 Tensor3View Tensor7View::operator()
4557  ( const Range& l,
4558  Index v, const Range& s, const Range& b,
4559  Index p, Index r, Index c)
4560 {
4561  CHECK(v);
4562  CHECK(p);
4563  CHECK(r);
4564  CHECK(c);
4565  return Tensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4566  mlr, msr, mbr,
4567  l, s, b );
4568 }
4569 // ||--|||
4570 MatrixView Tensor7View::operator()
4571  ( Index l,
4572  Index v, const Range& s, const Range& b,
4573  Index p, Index r, Index c)
4574 {
4575  CHECK(l);
4576  CHECK(v);
4577  CHECK(p);
4578  CHECK(r);
4579  CHECK(c);
4580  return MatrixView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4581  msr, mbr,
4582  s, b );
4583 }
4584 
4585 // --|-|||
4586 Tensor3View Tensor7View::operator()
4587  ( const Range& l,
4588  const Range& v, Index s, const Range& b,
4589  Index p, Index r, Index c)
4590 {
4591  CHECK(s);
4592  CHECK(p);
4593  CHECK(r);
4594  CHECK(c);
4595  return Tensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4596  mlr, mvr, mbr,
4597  l, v, b );
4598 }
4599 // |-|-|||
4600 MatrixView Tensor7View::operator()
4601  ( Index l,
4602  const Range& v, Index s, const Range& b,
4603  Index p, Index r, Index c)
4604 {
4605  CHECK(l);
4606  CHECK(s);
4607  CHECK(p);
4608  CHECK(r);
4609  CHECK(c);
4610  return MatrixView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4611  mvr, mbr,
4612  v, b );
4613 }
4614 
4615 // ---||||
4616 Tensor3View Tensor7View::operator()
4617  ( const Range& l,
4618  const Range& v, const Range& s, Index b,
4619  Index p, Index r, Index c)
4620 {
4621  CHECK(b);
4622  CHECK(p);
4623  CHECK(r);
4624  CHECK(c);
4625  return Tensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4626  mlr, mvr, msr,
4627  l, v, s );
4628 }
4629 // |--||||
4630 MatrixView Tensor7View::operator()
4631  ( Index l,
4632  const Range& v, const Range& s, Index b,
4633  Index p, Index r, Index c)
4634 {
4635  CHECK(l);
4636  CHECK(b);
4637  CHECK(p);
4638  CHECK(r);
4639  CHECK(c);
4640  return MatrixView(mdata + OFFSET(l) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4641  mvr, msr,
4642  v, s );
4643 }
4644 
4645 // -|||||-
4646 MatrixView Tensor7View::operator()
4647  ( const Range& l,
4648  Index v, Index s, Index b,
4649  Index p, Index r, const Range& c)
4650 {
4651  CHECK(v);
4652  CHECK(s);
4653  CHECK(b);
4654  CHECK(p);
4655  CHECK(r);
4656  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4657  mlr, mcr,
4658  l, c );
4659 }
4660 // ||||||-
4661 VectorView Tensor7View::operator()
4662  ( Index l,
4663  Index v, Index s, Index b,
4664  Index p, Index r, const Range& c)
4665 {
4666  CHECK(l);
4667  CHECK(v);
4668  CHECK(s);
4669  CHECK(b);
4670  CHECK(p);
4671  CHECK(r);
4672  return VectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
4673  mcr,
4674  c );
4675 }
4676 
4677 // -||||-|
4678 MatrixView Tensor7View::operator()
4679  ( const Range& l,
4680  Index v, Index s, Index b,
4681  Index p, const Range& r, Index c)
4682 {
4683  CHECK(v);
4684  CHECK(s);
4685  CHECK(b);
4686  CHECK(p);
4687  CHECK(c);
4688  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4689  mlr, mrr,
4690  l, r );
4691 }
4692 // |||||-|
4693 VectorView Tensor7View::operator()
4694  ( Index l,
4695  Index v, Index s, Index b,
4696  Index p, const Range& r, Index c)
4697 {
4698  CHECK(l);
4699  CHECK(v);
4700  CHECK(s);
4701  CHECK(b);
4702  CHECK(p);
4703  CHECK(c);
4704  return VectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
4705  mrr,
4706  r );
4707 }
4708 
4709 // -|||-||
4710 MatrixView Tensor7View::operator()
4711  ( const Range& l,
4712  Index v, Index s, Index b,
4713  const Range& p, Index r, Index c)
4714 {
4715  CHECK(v);
4716  CHECK(s);
4717  CHECK(b);
4718  CHECK(r);
4719  CHECK(c);
4720  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4721  mlr, mpr,
4722  l, p );
4723 }
4724 // ||||-||
4725 VectorView Tensor7View::operator()
4726  ( Index l,
4727  Index v, Index s, Index b,
4728  const Range& p, Index r, Index c)
4729 {
4730  CHECK(l);
4731  CHECK(v);
4732  CHECK(s);
4733  CHECK(b);
4734  CHECK(r);
4735  CHECK(c);
4736  return VectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
4737  mpr,
4738  p );
4739 }
4740 
4741 // -||-|||
4742 MatrixView Tensor7View::operator()
4743  ( const Range& l,
4744  Index v, Index s, const Range& b,
4745  Index p, Index r, Index c)
4746 {
4747  CHECK(v);
4748  CHECK(s);
4749  CHECK(p);
4750  CHECK(r);
4751  CHECK(c);
4752  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4753  mlr, mbr,
4754  l, b );
4755 }
4756 // |||-|||
4757 VectorView Tensor7View::operator()
4758  ( Index l,
4759  Index v, Index s, const Range& b,
4760  Index p, Index r, Index c)
4761 {
4762  CHECK(l);
4763  CHECK(v);
4764  CHECK(s);
4765  CHECK(p);
4766  CHECK(r);
4767  CHECK(c);
4768  return VectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4769  mbr,
4770  b );
4771 }
4772 
4773 // -|-||||
4774 MatrixView Tensor7View::operator()
4775  ( const Range& l,
4776  Index v, const Range& s, Index b,
4777  Index p, Index r, Index c)
4778 {
4779  CHECK(v);
4780  CHECK(b);
4781  CHECK(p);
4782  CHECK(r);
4783  CHECK(c);
4784  return MatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4785  mlr, msr,
4786  l, s );
4787 }
4788 // ||-||||
4789 VectorView Tensor7View::operator()
4790  ( Index l,
4791  Index v, const Range& s, Index b,
4792  Index p, Index r, Index c)
4793 {
4794  CHECK(l);
4795  CHECK(v);
4796  CHECK(b);
4797  CHECK(p);
4798  CHECK(r);
4799  CHECK(c);
4800  return VectorView(mdata + OFFSET(l) + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4801  msr,
4802  s );
4803 }
4804 
4805 // --|||||
4806 MatrixView Tensor7View::operator()
4807  ( const Range& l,
4808  const Range& v, Index s, Index b,
4809  Index p, Index r, Index c)
4810 {
4811  CHECK(s);
4812  CHECK(b);
4813  CHECK(p);
4814  CHECK(r);
4815  CHECK(c);
4816  return MatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4817  mlr, mvr,
4818  l, v );
4819 }
4820 // |-|||||
4821 VectorView Tensor7View::operator()
4822  ( Index l,
4823  const Range& v, Index s, Index b,
4824  Index p, Index r, Index c)
4825 {
4826  CHECK(l);
4827  CHECK(s);
4828  CHECK(b);
4829  CHECK(p);
4830  CHECK(r);
4831  CHECK(c);
4832  return VectorView(mdata + OFFSET(l) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
4833  mvr,
4834  v );
4835 }
4836 
4837 // -||||||
4838 VectorView Tensor7View::operator()
4839  ( const Range& l,
4840  Index v, Index s, Index b,
4841  Index p, Index r, Index c)
4842 {
4843  CHECK(v);
4844  CHECK(s);
4845  CHECK(b);
4846  CHECK(p);
4847  CHECK(r);
4848  CHECK(c);
4849  return VectorView( mdata +
4850  OFFSET(v) + OFFSET(s) + OFFSET(b) +
4851  OFFSET(p) + OFFSET(r) + OFFSET(c),
4852  mlr,
4853  l );
4854 }
4855 
4859 {
4860  return ConstTensor7View::begin();
4861 }
4862 
4865 {
4866  return ConstTensor7View::end();
4867 }
4868 
4871 {
4873  mvr,
4874  msr,
4875  mbr,
4876  mpr,
4877  mrr,
4878  mcr),
4879  mlr.mstride);
4880 }
4881 
4884 {
4885  return Iterator7D( Tensor6View(mdata + mlr.mstart +
4886  (mlr.mextent)*mlr.mstride,
4887  mvr,
4888  msr,
4889  mbr,
4890  mpr,
4891  mrr,
4892  mcr),
4893  mlr.mstride );
4894 }
4895 
4901 {
4902  // Check that sizes are compatible:
4903  assert(mlr.mextent==m.mlr.mextent);
4904  assert(mvr.mextent==m.mvr.mextent);
4905  assert(msr.mextent==m.msr.mextent);
4906  assert(mbr.mextent==m.mbr.mextent);
4907  assert(mpr.mextent==m.mpr.mextent);
4908  assert(mrr.mextent==m.mrr.mextent);
4909  assert(mcr.mextent==m.mcr.mextent);
4910 
4911  copy( m.begin(), m.end(), begin() );
4912  return *this;
4913 }
4914 
4921 {
4922  // Check that sizes are compatible:
4923  assert(mlr.mextent==m.mlr.mextent);
4924  assert(mvr.mextent==m.mvr.mextent);
4925  assert(msr.mextent==m.msr.mextent);
4926  assert(mbr.mextent==m.mbr.mextent);
4927  assert(mpr.mextent==m.mpr.mextent);
4928  assert(mrr.mextent==m.mrr.mextent);
4929  assert(mcr.mextent==m.mcr.mextent);
4930 
4931  copy( m.begin(), m.end(), begin() );
4932  return *this;
4933 }
4934 
4939 {
4940  // Check that sizes are compatible:
4941  assert(mlr.mextent==m.mlr.mextent);
4942  assert(mvr.mextent==m.mvr.mextent);
4943  assert(msr.mextent==m.msr.mextent);
4944  assert(mbr.mextent==m.mbr.mextent);
4945  assert(mpr.mextent==m.mpr.mextent);
4946  assert(mrr.mextent==m.mrr.mextent);
4947  assert(mcr.mextent==m.mcr.mextent);
4948 
4949  copy( m.begin(), m.end(), begin() );
4950  return *this;
4951 }
4952 
4956 {
4957  copy( x, begin(), end() );
4958  return *this;
4959 }
4960 
4961 // Some little helper functions:
4962 //------------------------------
4963 
4966 {
4967  const Iterator7D ep=end();
4968  for ( Iterator7D p=begin(); p!=ep ; ++p )
4969  {
4970  *p *= x;
4971  }
4972  return *this;
4973 }
4974 
4977 {
4978  const Iterator7D ep=end();
4979  for ( Iterator7D p=begin(); p!=ep ; ++p )
4980  {
4981  *p /= x;
4982  }
4983  return *this;
4984 }
4985 
4988 {
4989  const Iterator7D ep=end();
4990  for ( Iterator7D p=begin(); p!=ep ; ++p )
4991  {
4992  *p += x;
4993  }
4994  return *this;
4995 }
4996 
4999 {
5000  const Iterator7D ep=end();
5001  for ( Iterator7D p=begin(); p!=ep ; ++p )
5002  {
5003  *p -= x;
5004  }
5005  return *this;
5006 }
5007 
5010 {
5011  assert( nlibraries() == x.nlibraries() );
5012  assert( nvitrines() == x.nvitrines() );
5013  assert( nshelves() == x.nshelves() );
5014  assert( nbooks() == x.nbooks() );
5015  assert( npages() == x.npages() );
5016  assert( nrows() == x.nrows() );
5017  assert( ncols() == x.ncols() );
5018  ConstIterator7D xp = x.begin();
5019  Iterator7D p = begin();
5020  const Iterator7D ep = end();
5021  for ( ; p!=ep ; ++p,++xp )
5022  {
5023  *p *= *xp;
5024  }
5025  return *this;
5026 }
5027 
5030 {
5031  assert( nlibraries() == x.nlibraries() );
5032  assert( nvitrines() == x.nvitrines() );
5033  assert( nshelves() == x.nshelves() );
5034  assert( nbooks() == x.nbooks() );
5035  assert( npages() == x.npages() );
5036  assert( nrows() == x.nrows() );
5037  assert( ncols() == x.ncols() );
5038  ConstIterator7D xp = x.begin();
5039  Iterator7D p = begin();
5040  const Iterator7D ep = end();
5041  for ( ; p!=ep ; ++p,++xp )
5042  {
5043  *p /= *xp;
5044  }
5045  return *this;
5046 }
5047 
5050 {
5051  assert( nlibraries() == x.nlibraries() );
5052  assert( nvitrines() == x.nvitrines() );
5053  assert( nshelves() == x.nshelves() );
5054  assert( nbooks() == x.nbooks() );
5055  assert( npages() == x.npages() );
5056  assert( nrows() == x.nrows() );
5057  assert( ncols() == x.ncols() );
5058  ConstIterator7D xp = x.begin();
5059  Iterator7D p = begin();
5060  const Iterator7D ep = end();
5061  for ( ; p!=ep ; ++p,++xp )
5062  {
5063  *p += *xp;
5064  }
5065  return *this;
5066 }
5067 
5070 {
5071  assert( nlibraries() == x.nlibraries() );
5072  assert( nvitrines() == x.nvitrines() );
5073  assert( nshelves() == x.nshelves() );
5074  assert( nbooks() == x.nbooks() );
5075  assert( npages() == x.npages() );
5076  assert( nrows() == x.nrows() );
5077  assert( ncols() == x.ncols() );
5078  ConstIterator7D xp = x.begin();
5079  Iterator7D p = begin();
5080  const Iterator7D ep = end();
5081  for ( ; p!=ep ; ++p,++xp )
5082  {
5083  *p -= *xp;
5084  }
5085  return *this;
5086 }
5087 
5090  ConstTensor7View( a.mdata,
5091  Range(0,1,
5092  a.mvr.mextent*
5093  a.msr.mextent*
5094  a.mbr.mextent*
5095  a.mpr.mextent*
5096  a.mrr.mextent*
5097  a.mcr.mextent),
5098  a.mvr,
5099  a.msr,
5100  a.mbr,
5101  a.mpr,
5102  a.mrr,
5103  a.mcr )
5104 {
5105  // Nothing to do here.
5106 }
5107 
5112 {
5113  // Nothing to do here.
5114 }
5115 
5119  const Range& l,
5120  const Range& v,
5121  const Range& s,
5122  const Range& b,
5123  const Range& p,
5124  const Range& r,
5125  const Range& c) :
5126  ConstTensor7View(data, l, v, s, b, p, r, c)
5127 {
5128  // Nothing to do here.
5129 }
5130 
5156  const Range& pl,
5157  const Range& pv,
5158  const Range& ps,
5159  const Range& pb,
5160  const Range& pp,
5161  const Range& pr,
5162  const Range& pc,
5163  const Range& nl,
5164  const Range& nv,
5165  const Range& ns,
5166  const Range& nb,
5167  const Range& np,
5168  const Range& nr,
5169  const Range& nc) :
5170  ConstTensor7View(data,pl,pv,ps,pb,pp,pr,pc,nl,nv,ns,nb,np,nr,nc)
5171 {
5172  // Nothing to do here.
5173 }
5174 
5179 void copy(ConstIterator7D origin,
5180  const ConstIterator7D& end,
5181  Iterator7D target)
5182 {
5183  for ( ; origin!=end ; ++origin,++target )
5184  {
5185  // We use the copy function for the next smaller rank of tensor
5186  // recursively:
5187  copy(origin->begin(),
5188  origin->end(),
5189  target->begin());
5190  }
5191 }
5192 
5194 void copy(Numeric x,
5195  Iterator7D target,
5196  const Iterator7D& end)
5197 {
5198  for ( ; target!=end ; ++target )
5199  {
5200  // We use the copy function for the next smaller rank of tensor
5201  // recursively:
5202  copy(x,target->begin(),target->end());
5203  }
5204 }
5205 
5206 
5207 // Functions for Tensor7:
5208 // ---------------------
5209 
5213 {
5214  // Nothing to do here. However, note that the default constructor
5215  // for Tensor7View has been called in the initializer list. That is
5216  // crucial, otherwise internal range objects will not be properly
5217  // initialized.
5218 }
5219 
5223  Index v, Index s, Index b,
5224  Index p, Index r, Index c) :
5225  Tensor7View( new Numeric[l*v*s*b*p*r*c],
5226  Range(0,l,v*s*b*p*r*c),
5227  Range(0,v,s*b*p*r*c),
5228  Range(0,s,b*p*r*c),
5229  Range(0,b,p*r*c),
5230  Range(0,p,r*c),
5231  Range(0,r,c),
5232  Range(0,c))
5233 {
5234  // Nothing to do here.
5235 }
5236 
5239  Index v, Index s, Index b,
5240  Index p, Index r, Index c, Numeric fill) :
5241  Tensor7View( new Numeric[l*v*s*b*p*r*c],
5242  Range(0,l,v*s*b*p*r*c),
5243  Range(0,v,s*b*p*r*c),
5244  Range(0,s,b*p*r*c),
5245  Range(0,b,p*r*c),
5246  Range(0,p,r*c),
5247  Range(0,r,c),
5248  Range(0,c))
5249 {
5250  // Here we can access the raw memory directly, for slightly
5251  // increased efficiency:
5252  const Numeric *stop = mdata+l*v*s*b*p*r*c;
5253  for ( Numeric *x=mdata; x<stop; ++x )
5254  *x = fill;
5255 }
5256 
5260  Tensor7View( new Numeric[m.nlibraries()*m.nvitrines()*m.nshelves()
5261  *m.nbooks()*m.npages()*m.nrows()*m.ncols()],
5262  Range( 0, m.nlibraries(), m.nvitrines()*m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5263  Range( 0, m.nvitrines(), m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5264  Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5265  Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
5266  Range( 0, m.npages(), m.nrows()*m.ncols() ),
5267  Range( 0, m.nrows(), m.ncols() ),
5268  Range( 0, m.ncols() ) )
5269 {
5270  copy(m.begin(),m.end(),begin());
5271 }
5272 
5276  Tensor7View( new Numeric[m.nlibraries()*m.nvitrines()*m.nshelves()
5277  *m.nbooks()*m.npages()*m.nrows()*m.ncols()],
5278  Range( 0, m.nlibraries(), m.nvitrines()*m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5279  Range( 0, m.nvitrines(), m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5280  Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
5281  Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
5282  Range( 0, m.npages(), m.nrows()*m.ncols() ),
5283  Range( 0, m.nrows(), m.ncols() ),
5284  Range( 0, m.ncols() ) )
5285 {
5286  // There is a catch here: If m is an empty tensor, then it will have
5287  // dimensions of size 0. But these are used to initialize the stride
5288  // for higher dimensions! Thus, this method has to be consistent
5289  // with the behaviour of Range::Range. For now, Range::Range allows
5290  // also stride 0.
5291  copy(m.begin(),m.end(),begin());
5292 }
5293 
5295 
5319 {
5320  // cout << "Tensor7 copy: m = " << m.nrows() << " " << m.ncols() << "\n";
5321  // cout << " n = " << nrows() << " " << ncols() << "\n";
5322 
5323  resize( m.mlr.mextent,
5324  m.mvr.mextent, m.msr.mextent, m.mbr.mextent,
5325  m.mpr.mextent, m.mrr.mextent, m.mcr.mextent );
5326  copy( m.begin(), m.end(), begin() );
5327  return *this;
5328 }
5329 
5333 {
5334  copy( x, begin(), end() );
5335  return *this;
5336 }
5337 
5342  Index v, Index s, Index b,
5343  Index p, Index r, Index c)
5344 {
5345  assert( 0<=l );
5346  assert( 0<=v );
5347  assert( 0<=s );
5348  assert( 0<=b );
5349  assert( 0<=p );
5350  assert( 0<=r );
5351  assert( 0<=c );
5352 
5353  if ( mlr.mextent!=l ||
5354  mvr.mextent!=v ||
5355  msr.mextent!=s ||
5356  mbr.mextent!=b ||
5357  mpr.mextent!=p ||
5358  mrr.mextent!=r ||
5359  mcr.mextent!=c )
5360  {
5361  delete[] mdata;
5362  mdata = new Numeric[l*v*s*b*p*r*c];
5363 
5364  mlr.mstart = 0;
5365  mlr.mextent = l;
5366  mlr.mstride = v*s*b*p*r*c;
5367 
5368  mvr.mstart = 0;
5369  mvr.mextent = v;
5370  mvr.mstride = s*b*p*r*c;
5371 
5372  msr.mstart = 0;
5373  msr.mextent = s;
5374  msr.mstride = b*p*r*c;
5375 
5376  mbr.mstart = 0;
5377  mbr.mextent = b;
5378  mbr.mstride = p*r*c;
5379 
5380  mpr.mstart = 0;
5381  mpr.mextent = p;
5382  mpr.mstride = r*c;
5383 
5384  mrr.mstart = 0;
5385  mrr.mextent = r;
5386  mrr.mstride = c;
5387 
5388  mcr.mstart = 0;
5389  mcr.mextent = c;
5390  mcr.mstride = 1;
5391  }
5392 }
5393 
5397 {
5398 // cout << "Destroying a Tensor7:\n"
5399 // << *this << "\n........................................\n";
5400  delete[] mdata;
5401 }
5402 
5403 
5420  double (&my_func)(double),
5421  ConstTensor7View x )
5422 {
5423  // Check dimensions:
5424  assert( y.nlibraries() == x.nlibraries() );
5425  assert( y.nvitrines() == x.nvitrines() );
5426  assert( y.nshelves() == x.nshelves() );
5427  assert( y.nbooks() == x.nbooks() );
5428  assert( y.npages() == x.npages() );
5429  assert( y.nrows() == x.nrows() );
5430  assert( y.ncols() == x.ncols() );
5431 
5432  const ConstIterator7D xe = x.end();
5433  ConstIterator7D xi = x.begin();
5434  Iterator7D yi = y.begin();
5435  for ( ; xi!=xe; ++xi, ++yi )
5436  {
5437  // Use the transform function of lower dimensional tensors
5438  // recursively:
5439  transform(*yi,my_func,*xi);
5440  }
5441 }
5442 
5445 {
5446  const ConstIterator7D xe = x.end();
5447  ConstIterator7D xi = x.begin();
5448 
5449  // Initial value for max:
5450  Numeric themax = max(*xi);
5451  ++xi;
5452 
5453  for ( ; xi!=xe ; ++xi )
5454  {
5455  // Use the max function of lower dimensional tensors
5456  // recursively:
5457  Numeric maxi = max(*xi);
5458  if ( maxi > themax )
5459  themax = maxi;
5460  }
5461 
5462  return themax;
5463 }
5464 
5467 {
5468  const ConstIterator7D xe = x.end();
5469  ConstIterator7D xi = x.begin();
5470 
5471  // Initial value for min:
5472  Numeric themin = min(*xi);
5473  ++xi;
5474 
5475  for ( ; xi!=xe ; ++xi )
5476  {
5477  // Use the min function of lower dimensional tensors
5478  // recursively:
5479  Numeric mini = min(*xi);
5480  if ( mini < themin )
5481  themin = mini;
5482  }
5483 
5484  return themin;
5485 }
5486 
5487 
5489 // Helper function for debugging
5490 #ifndef NDEBUG
5491 
5511  Index b, Index p, Index r, Index c)
5512 {
5513  return tv(l, v, s, b, p, r, c);
5514 }
5515 
5516 #endif
5517 
ConstIterator7D
Const version of Iterator7D.
Definition: matpackVII.h:93
Tensor7View
The Tensor7View class.
Definition: matpackVII.h:779
ConstTensor6View::begin
ConstIterator6D begin() const
Return const iterator to first sub-tensor.
Definition: matpackVI.cc:898
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
ConstTensor7View::msr
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVII.h:757
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
Iterator7D
Implementation of Tensors of Rank 7.
Definition: matpackVII.h:35
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
Tensor7::~Tensor7
virtual ~Tensor7()
Destructor for Tensor7.
Definition: matpackVII.cc:5396
copy
void copy(ConstIterator7D origin, const ConstIterator7D &end, Iterator7D target)
Copy data between begin and end to target.
Definition: matpackVII.cc:5179
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
Tensor7::resize
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVII.cc:5341
Tensor7View::Tensor7View
Tensor7View()
Default constructor.
Definition: matpackVII.cc:5110
ConstTensor6View::end
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVI.cc:910
Tensor6View::end
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVI.cc:2390
Tensor7View::begin
ConstIterator7D begin() const
Return iterator to sub-tensor.
Definition: matpackVII.cc:4858
VectorView
The VectorView class.
Definition: matpackI.h:373
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
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
ns
#define ns
Definition: continua.cc:14564
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
ConstTensor7View::end
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVII.cc:1865
ConstTensor7View::mpr
Range mpr
The page range of mdata that is actually used.
Definition: matpackVII.h:761
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
Range::mextent
Index mextent
The number of elements.
Definition: matpackI.h:207
ConstTensor7View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVII.cc:49
max
Numeric max(const ConstTensor7View &x)
Max function, tensor version.
Definition: matpackVII.cc:5444
Tensor7View::operator*=
Tensor7View & operator*=(Numeric x)
Multiplication by scalar.
Definition: matpackVII.cc:4965
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
operator<<
ostream & operator<<(ostream &os, const ConstTensor7View &v)
Output operator.
Definition: matpackVII.cc:1970
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
Tensor6View::begin
ConstIterator6D begin() const
Return const iterator to sub-tensor.
Definition: matpackVI.cc:2384
ConstTensor7View::ConstTensor7View
ConstTensor7View()
Default constructor.
Definition: matpackVII.cc:1900
Tensor7::Tensor7
Tensor7()
Default constructor.
Definition: matpackVII.cc:5211
ConstTensor7View::mcr
Range mcr
The column range of mdata that is actually used.
Definition: matpackVII.h:765
Range::mstride
Index mstride
The stride.
Definition: matpackI.h:209
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
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
min
Numeric min(const ConstTensor7View &x)
Min function, tensor version.
Definition: matpackVII.cc:5466
ConstTensor5View
A constant view of a Tensor5.
Definition: matpackV.h:160
Tensor7
The Tensor7 class.
Definition: matpackVII.h:1912
matpackVII.h
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