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