ARTS  2.2.66
matpackVI.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 "matpackVI.h"
26 #include "exceptions.h"
27 
28 // Functions for ConstTensor6View:
29 // ------------------------------
30 
33 {
34  return mvr.mextent;
35 }
36 
39 {
40  return msr.mextent;
41 }
42 
45 {
46  return mbr.mextent;
47 }
48 
51 {
52  return mpr.mextent;
53 }
54 
57 {
58  return mrr.mextent;
59 }
60 
63 {
64  return mcr.mextent;
65 }
66 
67 // Const index operators:
68 
69 // Result 6D (1 combination)
70 // ------
71 ConstTensor6View ConstTensor6View::operator()
72  ( const Range& v, const Range& s, const Range& b,
73  const Range& p, const Range& r, const Range& c) const
74 {
75  return ConstTensor6View(mdata,
76  mvr, msr, mbr, mpr, mrr, mcr,
77  v, s, b, p, r, c);
78 }
79 
80 // Result 5D (6 combinations)
81 // -----|
82 ConstTensor5View ConstTensor6View::operator()
83  ( const Range& v, const Range& s, const Range& b,
84  const Range& p, const Range& r, Index c) const
85 {
86  CHECK(c);
87  return ConstTensor5View(mdata + OFFSET(c),
88  mvr, msr, mbr, mpr, mrr,
89  v, s, b, p, r);
90 }
91 
92 // ----|-
93 ConstTensor5View ConstTensor6View::operator()
94  ( const Range& v, const Range& s, const Range& b,
95  const Range& p, Index r, const Range& c) const
96 {
97  CHECK(r);
98  return ConstTensor5View(mdata + OFFSET(r),
99  mvr, msr, mbr, mpr, mcr,
100  v, s, b, p, c);
101 }
102 
103 // ---|--
104 ConstTensor5View ConstTensor6View::operator()
105  ( const Range& v, const Range& s, const Range& b,
106  Index p, const Range& r, const Range& c) const
107 {
108  CHECK(p);
109  return ConstTensor5View(mdata + OFFSET(p),
110  mvr, msr, mbr, mrr, mcr,
111  v, s, b, r, c);
112 }
113 
114 // --|---
115 ConstTensor5View ConstTensor6View::operator()
116  ( const Range& v, const Range& s, Index b,
117  const Range& p, const Range& r, const Range& c) const
118 {
119  CHECK(b);
120  return ConstTensor5View(mdata + OFFSET(b),
121  mvr, msr, mpr, mrr, mcr,
122  v, s, p, r, c);
123 }
124 
125 // -|----
126 ConstTensor5View ConstTensor6View::operator()
127  ( const Range& v, Index s, const Range& b,
128  const Range& p, const Range& r, const Range& c) const
129 {
130  CHECK(s);
131  return ConstTensor5View(mdata + OFFSET(s),
132  mvr, mbr, mpr, mrr, mcr,
133  v, b, p, r, c);
134 }
135 
136 // |-----
137 ConstTensor5View ConstTensor6View::operator()
138  ( Index v, const Range& s, const Range& b,
139  const Range& p, const Range& r, const Range& c) const
140 {
141  CHECK(v);
142  return ConstTensor5View(mdata + OFFSET(v),
143  msr, mbr, mpr, mrr, mcr,
144  s, b, p, r, c);
145 }
146 
147 
148 // Result 4D (5+4+3+2+1 = 15 combinations)
149 // ----||
150 ConstTensor4View ConstTensor6View::operator()
151  ( const Range& v, const Range& s, const Range& b,
152  const Range& p, Index r, Index c) const
153 {
154  CHECK(r);
155  CHECK(c);
156  return ConstTensor4View(mdata + OFFSET(r) + OFFSET(c),
157  mvr, msr, mbr, mpr,
158  v, s, b, p );
159 }
160 
161 // ---|-|
162 ConstTensor4View ConstTensor6View::operator()
163  ( const Range& v, const Range& s, const Range& b,
164  Index p, const Range& r, Index c) const
165 {
166  CHECK(p);
167  CHECK(c);
168  return ConstTensor4View(mdata + OFFSET(p) + OFFSET(c),
169  mvr, msr, mbr, mrr,
170  v, s, b, r );
171 }
172 
173 // --|--|
174 ConstTensor4View ConstTensor6View::operator()
175  ( const Range& v, const Range& s, Index b,
176  const Range& p, const Range& r, Index c) const
177 {
178  CHECK(b);
179  CHECK(c);
180  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(c),
181  mvr, msr, mpr, mrr,
182  v, s, p, r );
183 }
184 
185 // -|---|
186 ConstTensor4View ConstTensor6View::operator()
187  ( const Range& v, Index s, const Range& b,
188  const Range& p, const Range& r, Index c) const
189 {
190  CHECK(s);
191  CHECK(c);
192  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(c),
193  mvr, mbr, mpr, mrr,
194  v, b, p, r );
195 }
196 
197 // |----|
198 ConstTensor4View ConstTensor6View::operator()
199  ( Index v, const Range& s, const Range& b,
200  const Range& p, const Range& r, Index c) const
201 {
202  CHECK(v);
203  CHECK(c);
204  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(c),
205  msr, mbr, mpr, mrr,
206  s, b, p, r );
207 }
208 
209 // ---||-
210 ConstTensor4View ConstTensor6View::operator()
211  ( const Range& v, const Range& s, const Range& b,
212  Index p, Index r, const Range& c) const
213 {
214  CHECK(p);
215  CHECK(r);
216  return ConstTensor4View(mdata + OFFSET(p) + OFFSET(r),
217  mvr, msr, mbr, mcr,
218  v, s, b, c );
219 }
220 
221 // --|-|-
222 ConstTensor4View ConstTensor6View::operator()
223  ( const Range& v, const Range& s, Index b,
224  const Range& p, Index r, const Range& c) const
225 {
226  CHECK(b);
227  CHECK(r);
228  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(r),
229  mvr, msr, mpr, mcr,
230  v, s, p, c );
231 }
232 
233 // -|--|-
234 ConstTensor4View ConstTensor6View::operator()
235  ( const Range& v, Index s, const Range& b,
236  const Range& p, Index r, const Range& c) const
237 {
238  CHECK(s);
239  CHECK(r);
240  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(r),
241  mvr, mbr, mpr, mcr,
242  v, b, p, c );
243 }
244 
245 // |---|-
246 ConstTensor4View ConstTensor6View::operator()
247  ( Index v, const Range& s, const Range& b,
248  const Range& p, Index r, const Range& c) const
249 {
250  CHECK(v);
251  CHECK(r);
252  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(r),
253  msr, mbr, mpr, mcr,
254  s, b, p, c );
255 }
256 
257 // --||--
258 ConstTensor4View ConstTensor6View::operator()
259  ( const Range& v, const Range& s, Index b,
260  Index p, const Range& r, const Range& c) const
261 {
262  CHECK(b);
263  CHECK(p);
264  return ConstTensor4View(mdata + OFFSET(b) + OFFSET(p),
265  mvr, msr, mrr, mcr,
266  v, s, r, c );
267 }
268 
269 // -|-|--
270 ConstTensor4View ConstTensor6View::operator()
271  ( const Range& v, Index s, const Range& b,
272  Index p, const Range& r, const Range& c) const
273 {
274  CHECK(s);
275  CHECK(p);
276  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(p),
277  mvr, mbr, mrr, mcr,
278  v, b, r, c );
279 }
280 
281 // |--|--
282 ConstTensor4View ConstTensor6View::operator()
283  ( Index v, const Range& s, const Range& b,
284  Index p, const Range& r, const Range& c) const
285 {
286  CHECK(v);
287  CHECK(p);
288  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(p),
289  msr, mbr, mrr, mcr,
290  s, b, r, c );
291 }
292 
293 // -||---
294 ConstTensor4View ConstTensor6View::operator()
295  ( const Range& v, Index s, Index b,
296  const Range& p, const Range& r, const Range& c) const
297 {
298  CHECK(s);
299  CHECK(b);
300  return ConstTensor4View(mdata + OFFSET(s) + OFFSET(b),
301  mvr, mpr, mrr, mcr,
302  v, p, r, c );
303 }
304 
305 // |-|---
306 ConstTensor4View ConstTensor6View::operator()
307  ( Index v, const Range& s, Index b,
308  const Range& p, const Range& r, const Range& c) const
309 {
310  CHECK(v);
311  CHECK(b);
312  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(b),
313  msr, mpr, mrr, mcr,
314  s, p, r, c );
315 }
316 
317 // ||----
318 ConstTensor4View ConstTensor6View::operator()
319  ( Index v, Index s, const Range& b,
320  const Range& p, const Range& r, const Range& c) const
321 {
322  CHECK(v);
323  CHECK(s);
324  return ConstTensor4View(mdata + OFFSET(v) + OFFSET(s),
325  mbr, mpr, mrr, mcr,
326  b, p, r, c );
327 }
328 
329 
330 // Result 3D (4+3+2+1+ 3+2+1+ 2+1 +1 = 20 combinations)
331 // ---|||
332 ConstTensor3View ConstTensor6View::operator()
333  ( const Range& v, const Range& s, const Range& b,
334  Index p, Index r, Index c) const
335 {
336  CHECK(p);
337  CHECK(r);
338  CHECK(c);
339  return ConstTensor3View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
340  mvr, msr, mbr,
341  v, s, b );
342 }
343 
344 // --|-||
345 ConstTensor3View ConstTensor6View::operator()
346  ( const Range& v, const Range& s, Index b,
347  const Range& p, Index r, Index c) const
348 {
349  CHECK(b);
350  CHECK(r);
351  CHECK(c);
352  return ConstTensor3View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
353  mvr, msr, mpr,
354  v, s, p );
355 }
356 
357 // -|--||
358 ConstTensor3View ConstTensor6View::operator()
359  ( const Range& v, Index s, const Range& b,
360  const Range& p, Index r, Index c) const
361 {
362  CHECK(s);
363  CHECK(r);
364  CHECK(c);
365  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
366  mvr, mbr, mpr,
367  v, b, p );
368 }
369 
370 // |---||
371 ConstTensor3View ConstTensor6View::operator()
372  ( Index v, const Range& s, const Range& b,
373  const Range& p, Index r, Index c) const
374 {
375  CHECK(v);
376  CHECK(r);
377  CHECK(c);
378  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
379  msr, mbr, mpr,
380  s, b, p );
381 }
382 
383 // --||-|
384 ConstTensor3View ConstTensor6View::operator()
385  ( const Range& v, const Range& s, Index b,
386  Index p, const Range& r, Index c) const
387 {
388  CHECK(b);
389  CHECK(p);
390  CHECK(c);
391  return ConstTensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
392  mvr, msr, mrr,
393  v, s, r );
394 }
395 
396 // -|-|-|
397 ConstTensor3View ConstTensor6View::operator()
398  ( const Range& v, Index s, const Range& b,
399  Index p, const Range& r, Index c) const
400 {
401  CHECK(s);
402  CHECK(p);
403  CHECK(c);
404  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
405  mvr, mbr, mrr,
406  v, b, r );
407 }
408 
409 // |--|-|
410 ConstTensor3View ConstTensor6View::operator()
411  ( Index v, const Range& s, const Range& b,
412  Index p, const Range& r, Index c) const
413 {
414  CHECK(v);
415  CHECK(p);
416  CHECK(c);
417  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
418  msr, mbr, mrr,
419  s, b, r );
420 }
421 
422 // -||--|
423 ConstTensor3View ConstTensor6View::operator()
424  ( const Range& v, Index s, Index b,
425  const Range& p, const Range& r, Index c) const
426 {
427  CHECK(s);
428  CHECK(b);
429  CHECK(c);
430  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
431  mvr, mpr, mrr,
432  v, p, r );
433 }
434 
435 // |-|--|
436 ConstTensor3View ConstTensor6View::operator()
437  ( Index v, const Range& s, Index b,
438  const Range& p, const Range& r, Index c) const
439 {
440  CHECK(v);
441  CHECK(b);
442  CHECK(c);
443  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
444  msr, mpr, mrr,
445  s, p, r );
446 }
447 
448 // ||---|
449 ConstTensor3View ConstTensor6View::operator()
450  ( Index v, Index s, const Range& b,
451  const Range& p, const Range& r, Index c) const
452 {
453  CHECK(v);
454  CHECK(s);
455  CHECK(c);
456  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
457  mbr, mpr, mrr,
458  b, p, r );
459 }
460 
461 // --|||-
462 ConstTensor3View ConstTensor6View::operator()
463  ( const Range& v, const Range& s, Index b,
464  Index p, Index r, const Range& c) const
465 {
466  CHECK(b);
467  CHECK(p);
468  CHECK(r);
469  return ConstTensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r),
470  mvr, msr, mcr,
471  v, s, c );
472 }
473 
474 // -|-||-
475 ConstTensor3View ConstTensor6View::operator()
476  ( const Range& v, Index s, const Range& b,
477  Index p, Index r, const Range& c) const
478 {
479  CHECK(s);
480  CHECK(p);
481  CHECK(r);
482  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r),
483  mvr, mbr, mcr,
484  v, b, c );
485 }
486 
487 // |--||-
488 ConstTensor3View ConstTensor6View::operator()
489  ( Index v, const Range& s, const Range& b,
490  Index p, Index r, const Range& c) const
491 {
492  CHECK(v);
493  CHECK(p);
494  CHECK(r);
495  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r),
496  msr, mbr, mcr,
497  s, b, c );
498 }
499 
500 // -||-|-
501 ConstTensor3View ConstTensor6View::operator()
502  ( const Range& v, Index s, Index b,
503  const Range& p, Index r, const Range& c) const
504 {
505  CHECK(s);
506  CHECK(b);
507  CHECK(r);
508  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r),
509  mvr, mpr, mcr,
510  v, p, c );
511 }
512 
513 // |-|-|-
514 ConstTensor3View ConstTensor6View::operator()
515  ( Index v, const Range& s, Index b,
516  const Range& p, Index r, const Range& c) const
517 {
518  CHECK(v);
519  CHECK(b);
520  CHECK(r);
521  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r),
522  msr, mpr, mcr,
523  s, p, c );
524 }
525 
526 // ||--|-
527 ConstTensor3View ConstTensor6View::operator()
528  ( Index v, Index s, const Range& b,
529  const Range& p, Index r, const Range& c) const
530 {
531  CHECK(v);
532  CHECK(s);
533  CHECK(r);
534  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r),
535  mbr, mpr, mcr,
536  b, p, c );
537 }
538 
539 // -|||--
540 ConstTensor3View ConstTensor6View::operator()
541  ( const Range& v, Index s, Index b,
542  Index p, const Range& r, const Range& c) const
543 {
544  CHECK(s);
545  CHECK(b);
546  CHECK(p);
547  return ConstTensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p),
548  mvr, mrr, mcr,
549  v, r, c );
550 }
551 
552 // |-||--
553 ConstTensor3View ConstTensor6View::operator()
554  ( Index v, const Range& s, Index b,
555  Index p, const Range& r, const Range& c) const
556 {
557  CHECK(v);
558  CHECK(b);
559  CHECK(p);
560  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p),
561  msr, mrr, mcr,
562  s, r, c );
563 }
564 
565 // ||-|--
566 ConstTensor3View ConstTensor6View::operator()
567  ( Index v, Index s, const Range& b,
568  Index p, const Range& r, const Range& c) const
569 {
570  CHECK(v);
571  CHECK(s);
572  CHECK(p);
573  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p),
574  mbr, mrr, mcr,
575  b, r, c );
576 }
577 
578 // |||---
579 ConstTensor3View ConstTensor6View::operator()
580  ( Index v, Index s, Index b,
581  const Range& p, const Range& r, const Range& c) const
582 {
583  CHECK(v);
584  CHECK(s);
585  CHECK(b);
586  return ConstTensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b),
587  mpr, mrr, mcr,
588  p, r, c );
589 }
590 
591 
592 // Result 2D (15 combinations)
593 // IIII--
594 ConstMatrixView ConstTensor6View::operator()
595  ( Index v, Index s, Index b,
596  Index p, const Range& r, const Range& c) const
597 {
598  CHECK(v);
599  CHECK(s);
600  CHECK(b);
601  CHECK(p);
602  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
603  mrr, mcr,
604  r, c );
605 }
606 
607 // III-I-
608 ConstMatrixView ConstTensor6View::operator()
609  ( Index v, Index s, Index b,
610  const Range& p, Index r, const Range& c) const
611 {
612  CHECK(v);
613  CHECK(s);
614  CHECK(b);
615  CHECK(r);
616  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
617  mpr, mcr,
618  p, c );
619 }
620 
621 // II-II-
622 ConstMatrixView ConstTensor6View::operator()
623  ( Index v, Index s, const Range& b,
624  Index p, Index r, const Range& c) const
625 {
626  CHECK(v);
627  CHECK(s);
628  CHECK(p);
629  CHECK(r);
630  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
631  mbr, mcr,
632  b, c );
633 }
634 
635 // I-III-
636 ConstMatrixView ConstTensor6View::operator()
637  ( Index v, const Range& s, Index b,
638  Index p, Index r, const Range& c) const
639 {
640  CHECK(v);
641  CHECK(b);
642  CHECK(p);
643  CHECK(r);
644  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
645  msr, mcr,
646  s, c );
647 }
648 
649 // -IIII-
650 ConstMatrixView ConstTensor6View::operator()
651  ( const Range& v, Index s, Index b,
652  Index p, Index r, const Range& c) const
653 {
654  CHECK(s);
655  CHECK(b);
656  CHECK(p);
657  CHECK(r);
658  return ConstMatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
659  mvr, mcr,
660  v, c );
661 }
662 
663 // III--I
664 ConstMatrixView ConstTensor6View::operator()
665  ( Index v, Index s, Index b,
666  const Range& p, const Range& r, Index c) const
667 {
668  CHECK(v);
669  CHECK(s);
670  CHECK(b);
671  CHECK(c);
672  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
673  mpr, mrr,
674  p, r );
675 }
676 
677 // II-I-I
678 ConstMatrixView ConstTensor6View::operator()
679  ( Index v, Index s, const Range& b,
680  Index p, const Range& r, Index c) const
681 {
682  CHECK(v);
683  CHECK(s);
684  CHECK(p);
685  CHECK(c);
686  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
687  mbr, mrr,
688  b, r );
689 }
690 
691 // I-II-I
692 ConstMatrixView ConstTensor6View::operator()
693  ( Index v, const Range& s, Index b,
694  Index p, const Range& r, Index c) const
695 {
696  CHECK(v);
697  CHECK(b);
698  CHECK(p);
699  CHECK(c);
700  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
701  msr, mrr,
702  s, r );
703 }
704 
705 // -III-I
706 ConstMatrixView ConstTensor6View::operator()
707  ( const Range& v, Index s, Index b,
708  Index p, const Range& r, Index c) const
709 {
710  CHECK(s);
711  CHECK(b);
712  CHECK(p);
713  CHECK(c);
714  return ConstMatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
715  mvr, mrr,
716  v, r );
717 }
718 
719 // II--II
720 ConstMatrixView ConstTensor6View::operator()
721  ( Index v, Index s, const Range& b,
722  const Range& p, Index r, Index c) const
723 {
724  CHECK(v);
725  CHECK(s);
726  CHECK(r);
727  CHECK(c);
728  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
729  mbr, mpr,
730  b, p );
731 }
732 
733 // I-I-II
734 ConstMatrixView ConstTensor6View::operator()
735  ( Index v, const Range& s, Index b,
736  const Range& p, Index r, Index c) const
737 {
738  CHECK(v);
739  CHECK(b);
740  CHECK(r);
741  CHECK(c);
742  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
743  msr, mpr,
744  s, p );
745 }
746 
747 // -II-II
748 ConstMatrixView ConstTensor6View::operator()
749  ( const Range& v, Index s, Index b,
750  const Range& p, Index r, Index c) const
751 {
752  CHECK(s);
753  CHECK(b);
754  CHECK(r);
755  CHECK(c);
756  return ConstMatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
757  mvr, mpr,
758  v, p );
759 }
760 
761 // I--III
762 ConstMatrixView ConstTensor6View::operator()
763  ( Index v, const Range& s, const Range& b,
764  Index p, Index r, Index c) const
765 {
766  CHECK(v);
767  CHECK(p);
768  CHECK(r);
769  CHECK(c);
770  return ConstMatrixView(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
771  msr, mbr,
772  s, b );
773 }
774 
775 // -I-III
776 ConstMatrixView ConstTensor6View::operator()
777  ( const Range& v, Index s, const Range& b,
778  Index p, Index r, Index c) const
779 {
780  CHECK(s);
781  CHECK(p);
782  CHECK(r);
783  CHECK(c);
784  return ConstMatrixView(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
785  mvr, mbr,
786  v, b );
787 }
788 
789 // --IIII
790 ConstMatrixView ConstTensor6View::operator()
791  ( const Range& v, const Range& s, Index b,
792  Index p, Index r, Index c) const
793 {
794  CHECK(b);
795  CHECK(p);
796  CHECK(r);
797  CHECK(c);
798  return ConstMatrixView(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
799  mvr, msr,
800  v, s );
801 }
802 
803 
804 // Result 1D (6 combinations)
805 // IIIII-
806 ConstVectorView ConstTensor6View::operator()
807  ( Index v, Index s, Index b,
808  Index p, Index r, const Range& c) const
809 {
810  CHECK(v);
811  CHECK(s);
812  CHECK(b);
813  CHECK(p);
814  CHECK(r);
815  return ConstVectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
816  mcr,
817  c );
818 }
819 
820 // IIII-I
821 ConstVectorView ConstTensor6View::operator()
822  ( Index v, Index s, Index b,
823  Index p, const Range& r, Index c) const
824 {
825  CHECK(v);
826  CHECK(s);
827  CHECK(b);
828  CHECK(p);
829  CHECK(c);
830  return ConstVectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
831  mrr,
832  r );
833 }
834 
835 // III-II
836 ConstVectorView ConstTensor6View::operator()
837  ( Index v, Index s, Index b,
838  const Range& p, Index r, Index c) const
839 {
840  CHECK(v);
841  CHECK(s);
842  CHECK(b);
843  CHECK(r);
844  CHECK(c);
845  return ConstVectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
846  mpr,
847  p );
848 }
849 
850 // II-III
851 ConstVectorView ConstTensor6View::operator()
852  ( Index v, Index s, const Range& b,
853  Index p, Index r, Index c) const
854 {
855  CHECK(v);
856  CHECK(s);
857  CHECK(p);
858  CHECK(r);
859  CHECK(c);
860  return ConstVectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
861  mbr,
862  b );
863 }
864 
865 // I-IIII
866 ConstVectorView ConstTensor6View::operator()
867  ( Index v, const Range& s, Index b,
868  Index p, Index r, Index c) const
869 {
870  CHECK(v);
871  CHECK(b);
872  CHECK(p);
873  CHECK(r);
874  CHECK(c);
875  return ConstVectorView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
876  msr,
877  s );
878 }
879 
880 // -IIIII
881 ConstVectorView ConstTensor6View::operator()
882  ( const Range& v, Index s, Index b,
883  Index p, Index r, Index c) const
884 {
885  CHECK(s);
886  CHECK(b);
887  CHECK(p);
888  CHECK(r);
889  CHECK(c);
890  return ConstVectorView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
891  mvr,
892  v );
893 }
894 
895 
896 
897 
900 {
902  msr,
903  mbr,
904  mpr,
905  mrr,
906  mcr),
907  mvr.mstride);
908 }
909 
912 {
915  msr,
916  mbr,
917  mpr,
918  mrr,
919  mcr),
920  mvr.mstride );
921 }
922 
925  mvr(0,1,
926  a.msr.mextent*
927  a.mbr.mextent*
928  a.mpr.mextent*
929  a.mrr.mextent*
930  a.mcr.mextent),
931  msr(a.msr),
932  mbr(a.mbr),
933  mpr(a.mpr),
934  mrr(a.mrr),
935  mcr(a.mcr),
936  mdata(a.mdata)
937 {
938  // Nothing to do here.
939 }
940 
944  mvr(0,0,1), msr(0,0,1), mbr(0,0,1),
945  mpr(0,0,1), mrr(0,0,1), mcr(0,0,1),
946  mdata(NULL)
947 {
948  // Nothing to do here.
949 }
950 
956  const Range& v,
957  const Range& s,
958  const Range& b,
959  const Range& p,
960  const Range& r,
961  const Range& c) :
962  mvr(v),
963  msr(s),
964  mbr(b),
965  mpr(p),
966  mrr(r),
967  mcr(c),
968  mdata(data)
969 {
970  // Nothing to do here.
971 }
972 
981  const Range& pv,
982  const Range& ps,
983  const Range& pb,
984  const Range& pp,
985  const Range& pr,
986  const Range& pc,
987  const Range& nv,
988  const Range& ns,
989  const Range& nb,
990  const Range& np,
991  const Range& nr,
992  const Range& nc) :
993  mvr(pv,nv),
994  msr(ps,ns),
995  mbr(pb,nb),
996  mpr(pp,np),
997  mrr(pr,nr),
998  mcr(pc,nc),
999  mdata(data)
1000 {
1001  // Nothing to do here.
1002 }
1003 
1007 std::ostream& operator<<(std::ostream& os, const ConstTensor6View& v)
1008 {
1009  // Page iterators:
1010  ConstIterator6D ip=v.begin();
1011  const ConstIterator6D end_page=v.end();
1012 
1013  if ( ip!=end_page )
1014  {
1015  os << *ip;
1016  ++ip;
1017  }
1018 
1019  for ( ; ip!=end_page; ++ip )
1020  {
1021  os << "\n\n";
1022  os << *ip;
1023  }
1024 
1025  return os;
1026 }
1027 
1028 
1029 // Functions for Tensor6View:
1030 // -------------------------
1031 
1032 // Const index operators:
1033 
1034 // Result 6D (1 combination)
1035 // ------
1036 ConstTensor6View Tensor6View::operator()
1037  ( const Range& v, const Range& s, const Range& b,
1038  const Range& p, const Range& r, const Range& c) const
1039 {
1040  return ConstTensor6View::operator()(v,s,b,p,r,c);
1041 }
1042 
1043 
1044 // Result 5D (6 combinations)
1045 // -----|
1046 ConstTensor5View Tensor6View::operator()
1047  ( const Range& v, const Range& s, const Range& b,
1048  const Range& p, const Range& r, Index c) const
1049 {
1050  return ConstTensor6View::operator()(v,s,b,p,r,c);
1051 }
1052 
1053 // ----|-
1054 ConstTensor5View Tensor6View::operator()
1055  ( const Range& v, const Range& s, const Range& b,
1056  const Range& p, Index r, const Range& c) const
1057 {
1058  return ConstTensor6View::operator()(v,s,b,p,r,c);
1059 }
1060 
1061 // ---|--
1062 ConstTensor5View Tensor6View::operator()
1063  ( const Range& v, const Range& s, const Range& b,
1064  Index p, const Range& r, const Range& c) const
1065 {
1066  return ConstTensor6View::operator()(v,s,b,p,r,c);
1067 }
1068 
1069 // --|---
1070 ConstTensor5View Tensor6View::operator()
1071  ( const Range& v, const Range& s, Index b,
1072  const Range& p, const Range& r, const Range& c) const
1073 {
1074  return ConstTensor6View::operator()(v,s,b,p,r,c);
1075 }
1076 
1077 // -|----
1078 ConstTensor5View Tensor6View::operator()
1079  ( const Range& v, Index s, const Range& b,
1080  const Range& p, const Range& r, const Range& c) const
1081 {
1082  return ConstTensor6View::operator()(v,s,b,p,r,c);
1083 }
1084 
1085 // |-----
1086 ConstTensor5View Tensor6View::operator()
1087  ( Index v, const Range& s, const Range& b,
1088  const Range& p, const Range& r, const Range& c) const
1089 {
1090  return ConstTensor6View::operator()(v,s,b,p,r,c);
1091 }
1092 
1093 
1094 // Result 4D (5+4+3+2+1 = 15 combinations)
1095 // ----||
1096 ConstTensor4View Tensor6View::operator()
1097  ( const Range& v, const Range& s, const Range& b,
1098  const Range& p, Index r, Index c) const
1099 {
1100  return ConstTensor6View::operator()(v,s,b,p,r,c);
1101 }
1102 
1103 // ---|-|
1104 ConstTensor4View Tensor6View::operator()
1105  ( const Range& v, const Range& s, const Range& b,
1106  Index p, const Range& r, Index c) const
1107 {
1108  return ConstTensor6View::operator()(v,s,b,p,r,c);
1109 }
1110 
1111 // --|--|
1112 ConstTensor4View Tensor6View::operator()
1113  ( const Range& v, const Range& s, Index b,
1114  const Range& p, const Range& r, Index c) const
1115 {
1116  return ConstTensor6View::operator()(v,s,b,p,r,c);
1117 }
1118 
1119 // -|---|
1120 ConstTensor4View Tensor6View::operator()
1121  ( const Range& v, Index s, const Range& b,
1122  const Range& p, const Range& r, Index c) const
1123 {
1124  return ConstTensor6View::operator()(v,s,b,p,r,c);
1125 }
1126 
1127 // |----|
1128 ConstTensor4View Tensor6View::operator()
1129  ( Index v, const Range& s, const Range& b,
1130  const Range& p, const Range& r, Index c) const
1131 {
1132  return ConstTensor6View::operator()(v,s,b,p,r,c);
1133 }
1134 
1135 // ---||-
1136 ConstTensor4View Tensor6View::operator()
1137  ( const Range& v, const Range& s, const Range& b,
1138  Index p, Index r, const Range& c) const
1139 {
1140  return ConstTensor6View::operator()(v,s,b,p,r,c);
1141 }
1142 
1143 // --|-|-
1144 ConstTensor4View Tensor6View::operator()
1145  ( const Range& v, const Range& s, Index b,
1146  const Range& p, Index r, const Range& c) const
1147 {
1148  return ConstTensor6View::operator()(v,s,b,p,r,c);
1149 }
1150 
1151 // -|--|-
1152 ConstTensor4View Tensor6View::operator()
1153  ( const Range& v, Index s, const Range& b,
1154  const Range& p, Index r, const Range& c) const
1155 {
1156  return ConstTensor6View::operator()(v,s,b,p,r,c);
1157 }
1158 
1159 // |---|-
1160 ConstTensor4View Tensor6View::operator()
1161  ( Index v, const Range& s, const Range& b,
1162  const Range& p, Index r, const Range& c) const
1163 {
1164  return ConstTensor6View::operator()(v,s,b,p,r,c);
1165 }
1166 
1167 // --||--
1168 ConstTensor4View Tensor6View::operator()
1169  ( const Range& v, const Range& s, Index b,
1170  Index p, const Range& r, const Range& c) const
1171 {
1172  return ConstTensor6View::operator()(v,s,b,p,r,c);
1173 }
1174 
1175 // -|-|--
1176 ConstTensor4View Tensor6View::operator()
1177  ( const Range& v, Index s, const Range& b,
1178  Index p, const Range& r, const Range& c) const
1179 {
1180  return ConstTensor6View::operator()(v,s,b,p,r,c);
1181 }
1182 
1183 // |--|--
1184 ConstTensor4View Tensor6View::operator()
1185  ( Index v, const Range& s, const Range& b,
1186  Index p, const Range& r, const Range& c) const
1187 {
1188  return ConstTensor6View::operator()(v,s,b,p,r,c);
1189 }
1190 
1191 // -||---
1192 ConstTensor4View Tensor6View::operator()
1193  ( const Range& v, Index s, Index b,
1194  const Range& p, const Range& r, const Range& c) const
1195 {
1196  return ConstTensor6View::operator()(v,s,b,p,r,c);
1197 }
1198 
1199 // |-|---
1200 ConstTensor4View Tensor6View::operator()
1201  ( Index v, const Range& s, Index b,
1202  const Range& p, const Range& r, const Range& c) const
1203 {
1204  return ConstTensor6View::operator()(v,s,b,p,r,c);
1205 }
1206 
1207 // ||----
1208 ConstTensor4View Tensor6View::operator()
1209  ( Index v, Index s, const Range& b,
1210  const Range& p, const Range& r, const Range& c) const
1211 {
1212  return ConstTensor6View::operator()(v,s,b,p,r,c);
1213 }
1214 
1215 
1216 // Result 3D (4+3+2+1+ 3+2+1+ 2+1 +1 = 20 combinations)
1217 // ---|||
1218 ConstTensor3View Tensor6View::operator()
1219  ( const Range& v, const Range& s, const Range& b,
1220  Index p, Index r, Index c) const
1221 {
1222  return ConstTensor6View::operator()(v,s,b,p,r,c);
1223 }
1224 
1225 // --|-||
1226 ConstTensor3View Tensor6View::operator()
1227  ( const Range& v, const Range& s, Index b,
1228  const Range& p, Index r, Index c) const
1229 {
1230  return ConstTensor6View::operator()(v,s,b,p,r,c);
1231 }
1232 
1233 // -|--||
1234 ConstTensor3View Tensor6View::operator()
1235  ( const Range& v, Index s, const Range& b,
1236  const Range& p, Index r, Index c) const
1237 {
1238  return ConstTensor6View::operator()(v,s,b,p,r,c);
1239 }
1240 
1241 // |---||
1242 ConstTensor3View Tensor6View::operator()
1243  ( Index v, const Range& s, const Range& b,
1244  const Range& p, Index r, Index c) const
1245 {
1246  return ConstTensor6View::operator()(v,s,b,p,r,c);
1247 }
1248 
1249 // --||-|
1250 ConstTensor3View Tensor6View::operator()
1251  ( const Range& v, const Range& s, Index b,
1252  Index p, const Range& r, Index c) const
1253 {
1254  return ConstTensor6View::operator()(v,s,b,p,r,c);
1255 }
1256 
1257 // -|-|-|
1258 ConstTensor3View Tensor6View::operator()
1259  ( const Range& v, Index s, const Range& b,
1260  Index p, const Range& r, Index c) const
1261 {
1262  return ConstTensor6View::operator()(v,s,b,p,r,c);
1263 }
1264 
1265 // |--|-|
1266 ConstTensor3View Tensor6View::operator()
1267  ( Index v, const Range& s, const Range& b,
1268  Index p, const Range& r, Index c) const
1269 {
1270  return ConstTensor6View::operator()(v,s,b,p,r,c);
1271 }
1272 
1273 // -||--|
1274 ConstTensor3View Tensor6View::operator()
1275  ( const Range& v, Index s, Index b,
1276  const Range& p, const Range& r, Index c) const
1277 {
1278  return ConstTensor6View::operator()(v,s,b,p,r,c);
1279 }
1280 
1281 // |-|--|
1282 ConstTensor3View Tensor6View::operator()
1283  ( Index v, const Range& s, Index b,
1284  const Range& p, const Range& r, Index c) const
1285 {
1286  return ConstTensor6View::operator()(v,s,b,p,r,c);
1287 }
1288 
1289 // ||---|
1290 ConstTensor3View Tensor6View::operator()
1291  ( Index v, Index s, const Range& b,
1292  const Range& p, const Range& r, Index c) const
1293 {
1294  return ConstTensor6View::operator()(v,s,b,p,r,c);
1295 }
1296 
1297 // --|||-
1298 ConstTensor3View Tensor6View::operator()
1299  ( const Range& v, const Range& s, Index b,
1300  Index p, Index r, const Range& c) const
1301 {
1302  return ConstTensor6View::operator()(v,s,b,p,r,c);
1303 }
1304 
1305 // -|-||-
1306 ConstTensor3View Tensor6View::operator()
1307  ( const Range& v, Index s, const Range& b,
1308  Index p, Index r, const Range& c) const
1309 {
1310  return ConstTensor6View::operator()(v,s,b,p,r,c);
1311 }
1312 
1313 // |--||-
1314 ConstTensor3View Tensor6View::operator()
1315  ( Index v, const Range& s, const Range& b,
1316  Index p, Index r, const Range& c) const
1317 {
1318  return ConstTensor6View::operator()(v,s,b,p,r,c);
1319 }
1320 
1321 // -||-|-
1322 ConstTensor3View Tensor6View::operator()
1323  ( const Range& v, Index s, Index b,
1324  const Range& p, Index r, const Range& c) const
1325 {
1326  return ConstTensor6View::operator()(v,s,b,p,r,c);
1327 }
1328 
1329 // |-|-|-
1330 ConstTensor3View Tensor6View::operator()
1331  ( Index v, const Range& s, Index b,
1332  const Range& p, Index r, const Range& c) const
1333 {
1334  return ConstTensor6View::operator()(v,s,b,p,r,c);
1335 }
1336 
1337 // ||--|-
1338 ConstTensor3View Tensor6View::operator()
1339  ( Index v, Index s, const Range& b,
1340  const Range& p, Index r, const Range& c) const
1341 {
1342  return ConstTensor6View::operator()(v,s,b,p,r,c);
1343 }
1344 
1345 // -|||--
1346 ConstTensor3View Tensor6View::operator()
1347  ( const Range& v, Index s, Index b,
1348  Index p, const Range& r, const Range& c) const
1349 {
1350  return ConstTensor6View::operator()(v,s,b,p,r,c);
1351 }
1352 
1353 // |-||--
1354 ConstTensor3View Tensor6View::operator()
1355  ( Index v, const Range& s, Index b,
1356  Index p, const Range& r, const Range& c) const
1357 {
1358  return ConstTensor6View::operator()(v,s,b,p,r,c);
1359 }
1360 
1361 // ||-|--
1362 ConstTensor3View Tensor6View::operator()
1363  ( Index v, Index s, const Range& b,
1364  Index p, const Range& r, const Range& c) const
1365 {
1366  return ConstTensor6View::operator()(v,s,b,p,r,c);
1367 }
1368 
1369 // |||---
1370 ConstTensor3View Tensor6View::operator()
1371  ( Index v, Index s, Index b,
1372  const Range& p, const Range& r, const Range& c) const
1373 {
1374  return ConstTensor6View::operator()(v,s,b,p,r,c);
1375 }
1376 
1377 
1378 // Result 2D (15 combinations)
1379 // IIII--
1380 ConstMatrixView Tensor6View::operator()
1381  ( Index v, Index s, Index b,
1382  Index p, const Range& r, const Range& c) const
1383 {
1384  return ConstTensor6View::operator()(v,s,b,p,r,c);
1385 }
1386 
1387 // III-I-
1388 ConstMatrixView Tensor6View::operator()
1389  ( Index v, Index s, Index b,
1390  const Range& p, Index r, const Range& c) const
1391 {
1392  return ConstTensor6View::operator()(v,s,b,p,r,c);
1393 }
1394 
1395 // II-II-
1396 ConstMatrixView Tensor6View::operator()
1397  ( Index v, Index s, const Range& b,
1398  Index p, Index r, const Range& c) const
1399 {
1400  return ConstTensor6View::operator()(v,s,b,p,r,c);
1401 }
1402 
1403 // I-III-
1404 ConstMatrixView Tensor6View::operator()
1405  ( Index v, const Range& s, Index b,
1406  Index p, Index r, const Range& c) const
1407 {
1408  return ConstTensor6View::operator()(v,s,b,p,r,c);
1409 }
1410 
1411 // -IIII-
1412 ConstMatrixView Tensor6View::operator()
1413  ( const Range& v, Index s, Index b,
1414  Index p, Index r, const Range& c) const
1415 {
1416  return ConstTensor6View::operator()(v,s,b,p,r,c);
1417 }
1418 
1419 // III--I
1420 ConstMatrixView Tensor6View::operator()
1421  ( Index v, Index s, Index b,
1422  const Range& p, const Range& r, Index c) const
1423 {
1424  return ConstTensor6View::operator()(v,s,b,p,r,c);
1425 }
1426 
1427 // II-I-I
1428 ConstMatrixView Tensor6View::operator()
1429  ( Index v, Index s, const Range& b,
1430  Index p, const Range& r, Index c) const
1431 {
1432  return ConstTensor6View::operator()(v,s,b,p,r,c);
1433 }
1434 
1435 // I-II-I
1436 ConstMatrixView Tensor6View::operator()
1437  ( Index v, const Range& s, Index b,
1438  Index p, const Range& r, Index c) const
1439 {
1440  return ConstTensor6View::operator()(v,s,b,p,r,c);
1441 }
1442 
1443 // -III-I
1444 ConstMatrixView Tensor6View::operator()
1445  ( const Range& v, Index s, Index b,
1446  Index p, const Range& r, Index c) const
1447 {
1448  return ConstTensor6View::operator()(v,s,b,p,r,c);
1449 }
1450 
1451 // II--II
1452 ConstMatrixView Tensor6View::operator()
1453  ( Index v, Index s, const Range& b,
1454  const Range& p, Index r, Index c) const
1455 {
1456  return ConstTensor6View::operator()(v,s,b,p,r,c);
1457 }
1458 
1459 // I-I-II
1460 ConstMatrixView Tensor6View::operator()
1461  ( Index v, const Range& s, Index b,
1462  const Range& p, Index r, Index c) const
1463 {
1464  return ConstTensor6View::operator()(v,s,b,p,r,c);
1465 }
1466 
1467 // -II-II
1468 ConstMatrixView Tensor6View::operator()
1469  ( const Range& v, Index s, Index b,
1470  const Range& p, Index r, Index c) const
1471 {
1472  return ConstTensor6View::operator()(v,s,b,p,r,c);
1473 }
1474 
1475 // I--III
1476 ConstMatrixView Tensor6View::operator()
1477  ( Index v, const Range& s, const Range& b,
1478  Index p, Index r, Index c) const
1479 {
1480  return ConstTensor6View::operator()(v,s,b,p,r,c);
1481 }
1482 
1483 // -I-III
1484 ConstMatrixView Tensor6View::operator()
1485  ( const Range& v, Index s, const Range& b,
1486  Index p, Index r, Index c) const
1487 {
1488  return ConstTensor6View::operator()(v,s,b,p,r,c);
1489 }
1490 
1491 // --IIII
1492 ConstMatrixView Tensor6View::operator()
1493  ( const Range& v, const Range& s, Index b,
1494  Index p, Index r, Index c) const
1495 {
1496  return ConstTensor6View::operator()(v,s,b,p,r,c);
1497 }
1498 
1499 
1500 // Result 1D (6 combinations)
1501 // IIIII-
1502 ConstVectorView Tensor6View::operator()
1503  ( Index v, Index s, Index b,
1504  Index p, Index r, const Range& c) const
1505 {
1506  return ConstTensor6View::operator()(v,s,b,p,r,c);
1507 }
1508 
1509 // IIII-I
1510 ConstVectorView Tensor6View::operator()
1511  ( Index v, Index s, Index b,
1512  Index p, const Range& r, Index c) const
1513 {
1514  return ConstTensor6View::operator()(v,s,b,p,r,c);
1515 }
1516 
1517 // III-II
1518 ConstVectorView Tensor6View::operator()
1519  ( Index v, Index s, Index b,
1520  const Range& p, Index r, Index c) const
1521 {
1522  return ConstTensor6View::operator()(v,s,b,p,r,c);
1523 }
1524 
1525 // II-III
1526 ConstVectorView Tensor6View::operator()
1527  ( Index v, Index s, const Range& b,
1528  Index p, Index r, Index c) const
1529 {
1530  return ConstTensor6View::operator()(v,s,b,p,r,c);
1531 }
1532 
1533 // I-IIII
1534 ConstVectorView Tensor6View::operator()
1535  ( Index v, const Range& s, Index b,
1536  Index p, Index r, Index c) const
1537 {
1538  return ConstTensor6View::operator()(v,s,b,p,r,c);
1539 }
1540 
1541 // -IIIII
1542 ConstVectorView Tensor6View::operator()
1543  ( const Range& v, Index s, Index b,
1544  Index p, Index r, Index c) const
1545 {
1546  return ConstTensor6View::operator()(v,s,b,p,r,c);
1547 }
1548 
1549 
1550 
1551 // Non-const index operators:
1552 
1553 // Result 6D (1 combination)
1554 // ------
1555 Tensor6View Tensor6View::operator()
1556  ( const Range& v, const Range& s, const Range& b,
1557  const Range& p, const Range& r, const Range& c)
1558 {
1559  return Tensor6View(mdata,
1560  mvr, msr, mbr, mpr, mrr, mcr,
1561  v, s, b, p, r, c);
1562 }
1563 
1564 
1565 // Result 5D (6 combinations)
1566 // -----|
1567 Tensor5View Tensor6View::operator()
1568  ( const Range& v, const Range& s, const Range& b,
1569  const Range& p, const Range& r, Index c)
1570 {
1571  CHECK(c);
1572  return Tensor5View(mdata + OFFSET(c),
1573  mvr, msr, mbr, mpr, mrr,
1574  v, s, b, p, r);
1575 }
1576 
1577 // ----|-
1578 Tensor5View Tensor6View::operator()
1579  ( const Range& v, const Range& s, const Range& b,
1580  const Range& p, Index r, const Range& c)
1581 {
1582  CHECK(r);
1583  return Tensor5View(mdata + OFFSET(r),
1584  mvr, msr, mbr, mpr, mcr,
1585  v, s, b, p, c);
1586 }
1587 
1588 // ---|--
1589 Tensor5View Tensor6View::operator()
1590  ( const Range& v, const Range& s, const Range& b,
1591  Index p, const Range& r, const Range& c)
1592 {
1593  CHECK(p);
1594  return Tensor5View(mdata + OFFSET(p),
1595  mvr, msr, mbr, mrr, mcr,
1596  v, s, b, r, c);
1597 }
1598 
1599 // --|---
1600 Tensor5View Tensor6View::operator()
1601  ( const Range& v, const Range& s, Index b,
1602  const Range& p, const Range& r, const Range& c)
1603 {
1604  CHECK(b);
1605  return Tensor5View(mdata + OFFSET(b),
1606  mvr, msr, mpr, mrr, mcr,
1607  v, s, p, r, c);
1608 }
1609 
1610 // -|----
1611 Tensor5View Tensor6View::operator()
1612  ( const Range& v, Index s, const Range& b,
1613  const Range& p, const Range& r, const Range& c)
1614 {
1615  CHECK(s);
1616  return Tensor5View(mdata + OFFSET(s),
1617  mvr, mbr, mpr, mrr, mcr,
1618  v, b, p, r, c);
1619 }
1620 
1621 // |-----
1622 Tensor5View Tensor6View::operator()
1623  ( Index v, const Range& s, const Range& b,
1624  const Range& p, const Range& r, const Range& c)
1625 {
1626  CHECK(v);
1627  return Tensor5View(mdata + OFFSET(v),
1628  msr, mbr, mpr, mrr, mcr,
1629  s, b, p, r, c);
1630 }
1631 
1632 
1633 // Result 4D (5+4+3+2+1 = 15 combinations)
1634 // ----||
1635 Tensor4View Tensor6View::operator()
1636  ( const Range& v, const Range& s, const Range& b,
1637  const Range& p, Index r, Index c)
1638 {
1639  CHECK(r);
1640  CHECK(c);
1641  return Tensor4View(mdata + OFFSET(r) + OFFSET(c),
1642  mvr, msr, mbr, mpr,
1643  v, s, b, p );
1644 }
1645 
1646 // ---|-|
1647 Tensor4View Tensor6View::operator()
1648  ( const Range& v, const Range& s, const Range& b,
1649  Index p, const Range& r, Index c)
1650 {
1651  CHECK(p);
1652  CHECK(c);
1653  return Tensor4View(mdata + OFFSET(p) + OFFSET(c),
1654  mvr, msr, mbr, mrr,
1655  v, s, b, r );
1656 }
1657 
1658 // --|--|
1659 Tensor4View Tensor6View::operator()
1660  ( const Range& v, const Range& s, Index b,
1661  const Range& p, const Range& r, Index c)
1662 {
1663  CHECK(b);
1664  CHECK(c);
1665  return Tensor4View(mdata + OFFSET(b) + OFFSET(c),
1666  mvr, msr, mpr, mrr,
1667  v, s, p, r );
1668 }
1669 
1670 // -|---|
1671 Tensor4View Tensor6View::operator()
1672  ( const Range& v, Index s, const Range& b,
1673  const Range& p, const Range& r, Index c)
1674 {
1675  CHECK(s);
1676  CHECK(c);
1677  return Tensor4View(mdata + OFFSET(s) + OFFSET(c),
1678  mvr, mbr, mpr, mrr,
1679  v, b, p, r );
1680 }
1681 
1682 // |----|
1683 Tensor4View Tensor6View::operator()
1684  ( Index v, const Range& s, const Range& b,
1685  const Range& p, const Range& r, Index c)
1686 {
1687  CHECK(v);
1688  CHECK(c);
1689  return Tensor4View(mdata + OFFSET(v) + OFFSET(c),
1690  msr, mbr, mpr, mrr,
1691  s, b, p, r );
1692 }
1693 
1694 // ---||-
1695 Tensor4View Tensor6View::operator()
1696  ( const Range& v, const Range& s, const Range& b,
1697  Index p, Index r, const Range& c)
1698 {
1699  CHECK(p);
1700  CHECK(r);
1701  return Tensor4View(mdata + OFFSET(p) + OFFSET(r),
1702  mvr, msr, mbr, mcr,
1703  v, s, b, c );
1704 }
1705 
1706 // --|-|-
1707 Tensor4View Tensor6View::operator()
1708  ( const Range& v, const Range& s, Index b,
1709  const Range& p, Index r, const Range& c)
1710 {
1711  CHECK(b);
1712  CHECK(r);
1713  return Tensor4View(mdata + OFFSET(b) + OFFSET(r),
1714  mvr, msr, mpr, mcr,
1715  v, s, p, c );
1716 }
1717 
1718 // -|--|-
1719 Tensor4View Tensor6View::operator()
1720  ( const Range& v, Index s, const Range& b,
1721  const Range& p, Index r, const Range& c)
1722 {
1723  CHECK(s);
1724  CHECK(r);
1725  return Tensor4View(mdata + OFFSET(s) + OFFSET(r),
1726  mvr, mbr, mpr, mcr,
1727  v, b, p, c );
1728 }
1729 
1730 // |---|-
1731 Tensor4View Tensor6View::operator()
1732  ( Index v, const Range& s, const Range& b,
1733  const Range& p, Index r, const Range& c)
1734 {
1735  CHECK(v);
1736  CHECK(r);
1737  return Tensor4View(mdata + OFFSET(v) + OFFSET(r),
1738  msr, mbr, mpr, mcr,
1739  s, b, p, c );
1740 }
1741 
1742 // --||--
1743 Tensor4View Tensor6View::operator()
1744  ( const Range& v, const Range& s, Index b,
1745  Index p, const Range& r, const Range& c)
1746 {
1747  CHECK(b);
1748  CHECK(p);
1749  return Tensor4View(mdata + OFFSET(b) + OFFSET(p),
1750  mvr, msr, mrr, mcr,
1751  v, s, r, c );
1752 }
1753 
1754 // -|-|--
1755 Tensor4View Tensor6View::operator()
1756  ( const Range& v, Index s, const Range& b,
1757  Index p, const Range& r, const Range& c)
1758 {
1759  CHECK(s);
1760  CHECK(p);
1761  return Tensor4View(mdata + OFFSET(s) + OFFSET(p),
1762  mvr, mbr, mrr, mcr,
1763  v, b, r, c );
1764 }
1765 
1766 // |--|--
1767 Tensor4View Tensor6View::operator()
1768  ( Index v, const Range& s, const Range& b,
1769  Index p, const Range& r, const Range& c)
1770 {
1771  CHECK(v);
1772  CHECK(p);
1773  return Tensor4View(mdata + OFFSET(v) + OFFSET(p),
1774  msr, mbr, mrr, mcr,
1775  s, b, r, c );
1776 }
1777 
1778 // -||---
1779 Tensor4View Tensor6View::operator()
1780  ( const Range& v, Index s, Index b,
1781  const Range& p, const Range& r, const Range& c)
1782 {
1783  CHECK(s);
1784  CHECK(b);
1785  return Tensor4View(mdata + OFFSET(s) + OFFSET(b),
1786  mvr, mpr, mrr, mcr,
1787  v, p, r, c );
1788 }
1789 
1790 // |-|---
1791 Tensor4View Tensor6View::operator()
1792  ( Index v, const Range& s, Index b,
1793  const Range& p, const Range& r, const Range& c)
1794 {
1795  CHECK(v);
1796  CHECK(b);
1797  return Tensor4View(mdata + OFFSET(v) + OFFSET(b),
1798  msr, mpr, mrr, mcr,
1799  s, p, r, c );
1800 }
1801 
1802 // ||----
1803 Tensor4View Tensor6View::operator()
1804  ( Index v, Index s, const Range& b,
1805  const Range& p, const Range& r, const Range& c)
1806 {
1807  CHECK(v);
1808  CHECK(s);
1809  return Tensor4View(mdata + OFFSET(v) + OFFSET(s),
1810  mbr, mpr, mrr, mcr,
1811  b, p, r, c );
1812 }
1813 
1814 
1815 // Result 3D (4+3+2+1+ 3+2+1+ 2+1 +1 = 20 combinations)
1816 // ---|||
1817 Tensor3View Tensor6View::operator()
1818  ( const Range& v, const Range& s, const Range& b,
1819  Index p, Index r, Index c)
1820 {
1821  CHECK(p);
1822  CHECK(r);
1823  CHECK(c);
1824  return Tensor3View(mdata + OFFSET(p) + OFFSET(r) + OFFSET(c),
1825  mvr, msr, mbr,
1826  v, s, b );
1827 }
1828 
1829 // --|-||
1830 Tensor3View Tensor6View::operator()
1831  ( const Range& v, const Range& s, Index b,
1832  const Range& p, Index r, Index c)
1833 {
1834  CHECK(b);
1835  CHECK(r);
1836  CHECK(c);
1837  return Tensor3View(mdata + OFFSET(b) + OFFSET(r) + OFFSET(c),
1838  mvr, msr, mpr,
1839  v, s, p );
1840 }
1841 
1842 // -|--||
1843 Tensor3View Tensor6View::operator()
1844  ( const Range& v, Index s, const Range& b,
1845  const Range& p, Index r, Index c)
1846 {
1847  CHECK(s);
1848  CHECK(r);
1849  CHECK(c);
1850  return Tensor3View(mdata + OFFSET(s) + OFFSET(r) + OFFSET(c),
1851  mvr, mbr, mpr,
1852  v, b, p );
1853 }
1854 
1855 // |---||
1856 Tensor3View Tensor6View::operator()
1857  ( Index v, const Range& s, const Range& b,
1858  const Range& p, Index r, Index c)
1859 {
1860  CHECK(v);
1861  CHECK(r);
1862  CHECK(c);
1863  return Tensor3View(mdata + OFFSET(v) + OFFSET(r) + OFFSET(c),
1864  msr, mbr, mpr,
1865  s, b, p );
1866 }
1867 
1868 // --||-|
1869 Tensor3View Tensor6View::operator()
1870  ( const Range& v, const Range& s, Index b,
1871  Index p, const Range& r, Index c)
1872 {
1873  CHECK(b);
1874  CHECK(p);
1875  CHECK(c);
1876  return Tensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(c),
1877  mvr, msr, mrr,
1878  v, s, r );
1879 }
1880 
1881 // -|-|-|
1882 Tensor3View Tensor6View::operator()
1883  ( const Range& v, Index s, const Range& b,
1884  Index p, const Range& r, Index c)
1885 {
1886  CHECK(s);
1887  CHECK(p);
1888  CHECK(c);
1889  return Tensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(c),
1890  mvr, mbr, mrr,
1891  v, b, r );
1892 }
1893 
1894 // |--|-|
1895 Tensor3View Tensor6View::operator()
1896  ( Index v, const Range& s, const Range& b,
1897  Index p, const Range& r, Index c)
1898 {
1899  CHECK(v);
1900  CHECK(p);
1901  CHECK(c);
1902  return Tensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(c),
1903  msr, mbr, mrr,
1904  s, b, r );
1905 }
1906 
1907 // -||--|
1908 Tensor3View Tensor6View::operator()
1909  ( const Range& v, Index s, Index b,
1910  const Range& p, const Range& r, Index c)
1911 {
1912  CHECK(s);
1913  CHECK(b);
1914  CHECK(c);
1915  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(c),
1916  mvr, mpr, mrr,
1917  v, p, r );
1918 }
1919 
1920 // |-|--|
1921 Tensor3View Tensor6View::operator()
1922  ( Index v, const Range& s, Index b,
1923  const Range& p, const Range& r, Index c)
1924 {
1925  CHECK(v);
1926  CHECK(b);
1927  CHECK(c);
1928  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(c),
1929  msr, mpr, mrr,
1930  s, p, r );
1931 }
1932 
1933 // ||---|
1934 Tensor3View Tensor6View::operator()
1935  ( Index v, Index s, const Range& b,
1936  const Range& p, const Range& r, Index c)
1937 {
1938  CHECK(v);
1939  CHECK(s);
1940  CHECK(c);
1941  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(c),
1942  mbr, mpr, mrr,
1943  b, p, r );
1944 }
1945 
1946 // --|||-
1947 Tensor3View Tensor6View::operator()
1948  ( const Range& v, const Range& s, Index b,
1949  Index p, Index r, const Range& c)
1950 {
1951  CHECK(b);
1952  CHECK(p);
1953  CHECK(r);
1954  return Tensor3View(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r),
1955  mvr, msr, mcr,
1956  v, s, c );
1957 }
1958 
1959 // -|-||-
1960 Tensor3View Tensor6View::operator()
1961  ( const Range& v, Index s, const Range& b,
1962  Index p, Index r, const Range& c)
1963 {
1964  CHECK(s);
1965  CHECK(p);
1966  CHECK(r);
1967  return Tensor3View(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r),
1968  mvr, mbr, mcr,
1969  v, b, c );
1970 }
1971 
1972 // |--||-
1973 Tensor3View Tensor6View::operator()
1974  ( Index v, const Range& s, const Range& b,
1975  Index p, Index r, const Range& c)
1976 {
1977  CHECK(v);
1978  CHECK(p);
1979  CHECK(r);
1980  return Tensor3View(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r),
1981  msr, mbr, mcr,
1982  s, b, c );
1983 }
1984 
1985 // -||-|-
1986 Tensor3View Tensor6View::operator()
1987  ( const Range& v, Index s, Index b,
1988  const Range& p, Index r, const Range& c)
1989 {
1990  CHECK(s);
1991  CHECK(b);
1992  CHECK(r);
1993  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r),
1994  mvr, mpr, mcr,
1995  v, p, c );
1996 }
1997 
1998 // |-|-|-
1999 Tensor3View Tensor6View::operator()
2000  ( Index v, const Range& s, Index b,
2001  const Range& p, Index r, const Range& c)
2002 {
2003  CHECK(v);
2004  CHECK(b);
2005  CHECK(r);
2006  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r),
2007  msr, mpr, mcr,
2008  s, p, c );
2009 }
2010 
2011 // ||--|-
2012 Tensor3View Tensor6View::operator()
2013  ( Index v, Index s, const Range& b,
2014  const Range& p, Index r, const Range& c)
2015 {
2016  CHECK(v);
2017  CHECK(s);
2018  CHECK(r);
2019  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r),
2020  mbr, mpr, mcr,
2021  b, p, c );
2022 }
2023 
2024 // -|||--
2025 Tensor3View Tensor6View::operator()
2026  ( const Range& v, Index s, Index b,
2027  Index p, const Range& r, const Range& c)
2028 {
2029  CHECK(s);
2030  CHECK(b);
2031  CHECK(p);
2032  return Tensor3View(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p),
2033  mvr, mrr, mcr,
2034  v, r, c );
2035 }
2036 
2037 // |-||--
2038 Tensor3View Tensor6View::operator()
2039  ( Index v, const Range& s, Index b,
2040  Index p, const Range& r, const Range& c)
2041 {
2042  CHECK(v);
2043  CHECK(b);
2044  CHECK(p);
2045  return Tensor3View(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p),
2046  msr, mrr, mcr,
2047  s, r, c );
2048 }
2049 
2050 // ||-|--
2051 Tensor3View Tensor6View::operator()
2052  ( Index v, Index s, const Range& b,
2053  Index p, const Range& r, const Range& c)
2054 {
2055  CHECK(v);
2056  CHECK(s);
2057  CHECK(p);
2058  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p),
2059  mbr, mrr, mcr,
2060  b, r, c );
2061 }
2062 
2063 // |||---
2064 Tensor3View Tensor6View::operator()
2065  ( Index v, Index s, Index b,
2066  const Range& p, const Range& r, const Range& c)
2067 {
2068  CHECK(v);
2069  CHECK(s);
2070  CHECK(b);
2071  return Tensor3View(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b),
2072  mpr, mrr, mcr,
2073  p, r, c );
2074 }
2075 
2076 
2077 // Result 2D (15 combinations)
2078 // IIII--
2079 MatrixView Tensor6View::operator()
2080  ( Index v, Index s, Index b,
2081  Index p, const Range& r, const Range& c)
2082 {
2083  CHECK(v);
2084  CHECK(s);
2085  CHECK(b);
2086  CHECK(p);
2087  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p),
2088  mrr, mcr,
2089  r, c );
2090 }
2091 
2092 // III-I-
2093 MatrixView Tensor6View::operator()
2094  ( Index v, Index s, Index b,
2095  const Range& p, Index r, const Range& c)
2096 {
2097  CHECK(v);
2098  CHECK(s);
2099  CHECK(b);
2100  CHECK(r);
2101  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r),
2102  mpr, mcr,
2103  p, c );
2104 }
2105 
2106 // II-II-
2107 MatrixView Tensor6View::operator()
2108  ( Index v, Index s, const Range& b,
2109  Index p, Index r, const Range& c)
2110 {
2111  CHECK(v);
2112  CHECK(s);
2113  CHECK(p);
2114  CHECK(r);
2115  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r),
2116  mbr, mcr,
2117  b, c );
2118 }
2119 
2120 // I-III-
2121 MatrixView Tensor6View::operator()
2122  ( Index v, const Range& s, Index b,
2123  Index p, Index r, const Range& c)
2124 {
2125  CHECK(v);
2126  CHECK(b);
2127  CHECK(p);
2128  CHECK(r);
2129  return MatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r),
2130  msr, mcr,
2131  s, c );
2132 }
2133 
2134 // -IIII-
2135 MatrixView Tensor6View::operator()
2136  ( const Range& v, Index s, Index b,
2137  Index p, Index r, const Range& c)
2138 {
2139  CHECK(s);
2140  CHECK(b);
2141  CHECK(p);
2142  CHECK(r);
2143  return MatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
2144  mvr, mcr,
2145  v, c );
2146 }
2147 
2148 // III--I
2149 MatrixView Tensor6View::operator()
2150  ( Index v, Index s, Index b,
2151  const Range& p, const Range& r, Index c)
2152 {
2153  CHECK(v);
2154  CHECK(s);
2155  CHECK(b);
2156  CHECK(c);
2157  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(c),
2158  mpr, mrr,
2159  p, r );
2160 }
2161 
2162 // II-I-I
2163 MatrixView Tensor6View::operator()
2164  ( Index v, Index s, const Range& b,
2165  Index p, const Range& r, Index c)
2166 {
2167  CHECK(v);
2168  CHECK(s);
2169  CHECK(p);
2170  CHECK(c);
2171  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(c),
2172  mbr, mrr,
2173  b, r );
2174 }
2175 
2176 // I-II-I
2177 MatrixView Tensor6View::operator()
2178  ( Index v, const Range& s, Index b,
2179  Index p, const Range& r, Index c)
2180 {
2181  CHECK(v);
2182  CHECK(b);
2183  CHECK(p);
2184  CHECK(c);
2185  return MatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(c),
2186  msr, mrr,
2187  s, r );
2188 }
2189 
2190 // -III-I
2191 MatrixView Tensor6View::operator()
2192  ( const Range& v, Index s, Index b,
2193  Index p, const Range& r, Index c)
2194 {
2195  CHECK(s);
2196  CHECK(b);
2197  CHECK(p);
2198  CHECK(c);
2199  return MatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
2200  mvr, mrr,
2201  v, r );
2202 }
2203 
2204 // II--II
2205 MatrixView Tensor6View::operator()
2206  ( Index v, Index s, const Range& b,
2207  const Range& p, Index r, Index c)
2208 {
2209  CHECK(v);
2210  CHECK(s);
2211  CHECK(r);
2212  CHECK(c);
2213  return MatrixView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(r) + OFFSET(c),
2214  mbr, mpr,
2215  b, p );
2216 }
2217 
2218 // I-I-II
2219 MatrixView Tensor6View::operator()
2220  ( Index v, const Range& s, Index b,
2221  const Range& p, Index r, Index c)
2222 {
2223  CHECK(v);
2224  CHECK(b);
2225  CHECK(r);
2226  CHECK(c);
2227  return MatrixView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2228  msr, mpr,
2229  s, p );
2230 }
2231 
2232 // -II-II
2233 MatrixView Tensor6View::operator()
2234  ( const Range& v, Index s, Index b,
2235  const Range& p, Index r, Index c)
2236 {
2237  CHECK(s);
2238  CHECK(b);
2239  CHECK(r);
2240  CHECK(c);
2241  return MatrixView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2242  mvr, mpr,
2243  v, p );
2244 }
2245 
2246 // I--III
2247 MatrixView Tensor6View::operator()
2248  ( Index v, const Range& s, const Range& b,
2249  Index p, Index r, Index c)
2250 {
2251  CHECK(v);
2252  CHECK(p);
2253  CHECK(r);
2254  CHECK(c);
2255  return MatrixView(mdata + OFFSET(v) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2256  msr, mbr,
2257  s, b );
2258 }
2259 
2260 // -I-III
2261 MatrixView Tensor6View::operator()
2262  ( const Range& v, Index s, const Range& b,
2263  Index p, Index r, Index c)
2264 {
2265  CHECK(s);
2266  CHECK(p);
2267  CHECK(r);
2268  CHECK(c);
2269  return MatrixView(mdata + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2270  mvr, mbr,
2271  v, b );
2272 }
2273 
2274 // --IIII
2275 MatrixView Tensor6View::operator()
2276  ( const Range& v, const Range& s, Index b,
2277  Index p, Index r, Index c)
2278 {
2279  CHECK(b);
2280  CHECK(p);
2281  CHECK(r);
2282  CHECK(c);
2283  return MatrixView(mdata + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2284  mvr, msr,
2285  v, s );
2286 }
2287 
2288 
2289 // Result 1D (6 combinations)
2290 // IIIII-
2291 VectorView Tensor6View::operator()
2292  ( Index v, Index s, Index b,
2293  Index p, Index r, const Range& c)
2294 {
2295  CHECK(v);
2296  CHECK(s);
2297  CHECK(b);
2298  CHECK(p);
2299  CHECK(r);
2300  return VectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r),
2301  mcr,
2302  c );
2303 }
2304 
2305 // IIII-I
2306 VectorView Tensor6View::operator()
2307  ( Index v, Index s, Index b,
2308  Index p, const Range& r, Index c)
2309 {
2310  CHECK(v);
2311  CHECK(s);
2312  CHECK(b);
2313  CHECK(p);
2314  CHECK(c);
2315  return VectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(c),
2316  mrr,
2317  r );
2318 }
2319 
2320 // III-II
2321 VectorView Tensor6View::operator()
2322  ( Index v, Index s, Index b,
2323  const Range& p, Index r, Index c)
2324 {
2325  CHECK(v);
2326  CHECK(s);
2327  CHECK(b);
2328  CHECK(r);
2329  CHECK(c);
2330  return VectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(r) + OFFSET(c),
2331  mpr,
2332  p );
2333 }
2334 
2335 // II-III
2336 VectorView Tensor6View::operator()
2337  ( Index v, Index s, const Range& b,
2338  Index p, Index r, Index c)
2339 {
2340  CHECK(v);
2341  CHECK(s);
2342  CHECK(p);
2343  CHECK(r);
2344  CHECK(c);
2345  return VectorView(mdata + OFFSET(v) + OFFSET(s) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2346  mbr,
2347  b );
2348 }
2349 
2350 // I-IIII
2351 VectorView Tensor6View::operator()
2352  ( Index v, const Range& s, Index b,
2353  Index p, Index r, Index c)
2354 {
2355  CHECK(v);
2356  CHECK(b);
2357  CHECK(p);
2358  CHECK(r);
2359  CHECK(c);
2360  return VectorView(mdata + OFFSET(v) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2361  msr,
2362  s );
2363 }
2364 
2365 // -IIIII
2366 VectorView Tensor6View::operator()
2367  ( const Range& v, Index s, Index b,
2368  Index p, Index r, Index c)
2369 {
2370  CHECK(s);
2371  CHECK(b);
2372  CHECK(p);
2373  CHECK(r);
2374  CHECK(c);
2375  return VectorView(mdata + OFFSET(s) + OFFSET(b) + OFFSET(p) + OFFSET(r) + OFFSET(c),
2376  mvr,
2377  v );
2378 }
2379 
2380 
2388 {
2391  || mbr.mstart != 0 || mbr.mstride != mpr.mextent * mrr.mextent * mcr.mextent
2392  || mpr.mstart != 0 || mpr.mstride != mrr.mextent * mcr.mextent
2393  || mrr.mstart != 0 || mrr.mstride != mcr.mextent
2394  || mcr.mstart != 0 || mcr.mstride != 1)
2395  throw std::runtime_error("A Tensor6View can only be converted to a plain C-array if it's pointing to a continuous block of data");
2396 
2397  return mdata;
2398 }
2399 
2400 
2408 {
2411  || mbr.mstart != 0 || mbr.mstride != mpr.mextent * mrr.mextent * mcr.mextent
2412  || mpr.mstart != 0 || mpr.mstride != mrr.mextent * mcr.mextent
2413  || mrr.mstart != 0 || mrr.mstride != mcr.mextent
2414  || mcr.mstart != 0 || mcr.mstride != 1)
2415  throw std::runtime_error("A Tensor6View can only be converted to a plain C-array if it's pointing to a continuous block of data");
2416 
2417  return mdata;
2418 }
2419 
2420 
2424 {
2425  return ConstTensor6View::begin();
2426 }
2427 
2430 {
2431  return ConstTensor6View::end();
2432 }
2433 
2436 {
2438  msr,
2439  mbr,
2440  mpr,
2441  mrr,
2442  mcr),
2443  mvr.mstride);
2444 }
2445 
2448 {
2449  return Iterator6D( Tensor5View(mdata + mvr.mstart +
2450  (mvr.mextent)*mvr.mstride,
2451  msr,
2452  mbr,
2453  mpr,
2454  mrr,
2455  mcr),
2456  mvr.mstride );
2457 }
2458 
2464 {
2465  // Check that sizes are compatible:
2466  assert(mvr.mextent==m.mvr.mextent);
2467  assert(msr.mextent==m.msr.mextent);
2468  assert(mbr.mextent==m.mbr.mextent);
2469  assert(mpr.mextent==m.mpr.mextent);
2470  assert(mrr.mextent==m.mrr.mextent);
2471  assert(mcr.mextent==m.mcr.mextent);
2472 
2473  copy( m.begin(), m.end(), begin() );
2474  return *this;
2475 }
2476 
2483 {
2484  // Check that sizes are compatible:
2485  assert(mvr.mextent==m.mvr.mextent);
2486  assert(msr.mextent==m.msr.mextent);
2487  assert(mbr.mextent==m.mbr.mextent);
2488  assert(mpr.mextent==m.mpr.mextent);
2489  assert(mrr.mextent==m.mrr.mextent);
2490  assert(mcr.mextent==m.mcr.mextent);
2491 
2492  copy( m.begin(), m.end(), begin() );
2493  return *this;
2494 }
2495 
2500 {
2501  // Check that sizes are compatible:
2502  assert(mvr.mextent==m.mvr.mextent);
2503  assert(msr.mextent==m.msr.mextent);
2504  assert(mbr.mextent==m.mbr.mextent);
2505  assert(mpr.mextent==m.mpr.mextent);
2506  assert(mrr.mextent==m.mrr.mextent);
2507  assert(mcr.mextent==m.mcr.mextent);
2508 
2509  copy( m.begin(), m.end(), begin() );
2510  return *this;
2511 }
2512 
2516 {
2517  copy( x, begin(), end() );
2518  return *this;
2519 }
2520 
2521 // Some little helper functions:
2522 //------------------------------
2523 
2526 {
2527  const Iterator6D ep=end();
2528  for ( Iterator6D p=begin(); p!=ep ; ++p )
2529  {
2530  *p *= x;
2531  }
2532  return *this;
2533 }
2534 
2537 {
2538  const Iterator6D ep=end();
2539  for ( Iterator6D p=begin(); p!=ep ; ++p )
2540  {
2541  *p /= x;
2542  }
2543  return *this;
2544 }
2545 
2548 {
2549  const Iterator6D ep=end();
2550  for ( Iterator6D p=begin(); p!=ep ; ++p )
2551  {
2552  *p += x;
2553  }
2554  return *this;
2555 }
2556 
2559 {
2560  const Iterator6D ep=end();
2561  for ( Iterator6D p=begin(); p!=ep ; ++p )
2562  {
2563  *p -= x;
2564  }
2565  return *this;
2566 }
2567 
2570 {
2571  assert( nvitrines() == x.nvitrines() );
2572  assert( nshelves() == x.nshelves() );
2573  assert( nbooks() == x.nbooks() );
2574  assert( npages() == x.npages() );
2575  assert( nrows() == x.nrows() );
2576  assert( ncols() == x.ncols() );
2577  ConstIterator6D xp = x.begin();
2578  Iterator6D p = begin();
2579  const Iterator6D ep = end();
2580  for ( ; p!=ep ; ++p,++xp )
2581  {
2582  *p *= *xp;
2583  }
2584  return *this;
2585 }
2586 
2589 {
2590  assert( nvitrines() == x.nvitrines() );
2591  assert( nshelves() == x.nshelves() );
2592  assert( nbooks() == x.nbooks() );
2593  assert( npages() == x.npages() );
2594  assert( nrows() == x.nrows() );
2595  assert( ncols() == x.ncols() );
2596  ConstIterator6D xp = x.begin();
2597  Iterator6D p = begin();
2598  const Iterator6D ep = end();
2599  for ( ; p!=ep ; ++p,++xp )
2600  {
2601  *p /= *xp;
2602  }
2603  return *this;
2604 }
2605 
2608 {
2609  assert( nvitrines() == x.nvitrines() );
2610  assert( nshelves() == x.nshelves() );
2611  assert( nbooks() == x.nbooks() );
2612  assert( npages() == x.npages() );
2613  assert( nrows() == x.nrows() );
2614  assert( ncols() == x.ncols() );
2615  ConstIterator6D xp = x.begin();
2616  Iterator6D p = begin();
2617  const Iterator6D ep = end();
2618  for ( ; p!=ep ; ++p,++xp )
2619  {
2620  *p += *xp;
2621  }
2622  return *this;
2623 }
2624 
2627 {
2628  assert( nvitrines() == x.nvitrines() );
2629  assert( nshelves() == x.nshelves() );
2630  assert( nbooks() == x.nbooks() );
2631  assert( npages() == x.npages() );
2632  assert( nrows() == x.nrows() );
2633  assert( ncols() == x.ncols() );
2634  ConstIterator6D xp = x.begin();
2635  Iterator6D p = begin();
2636  const Iterator6D ep = end();
2637  for ( ; p!=ep ; ++p,++xp )
2638  {
2639  *p -= *xp;
2640  }
2641  return *this;
2642 }
2643 
2647  Range(0,1,
2648  a.msr.mextent*
2649  a.mbr.mextent*
2650  a.mpr.mextent*
2651  a.mrr.mextent*
2652  a.mcr.mextent),
2653  a.msr,
2654  a.mbr,
2655  a.mpr,
2656  a.mrr,
2657  a.mcr )
2658 {
2659  // Nothing to do here.
2660 }
2661 
2666 {
2667  // Nothing to do here.
2668 }
2669 
2674  const Range& v,
2675  const Range& s,
2676  const Range& b,
2677  const Range& p,
2678  const Range& r,
2679  const Range& c) :
2680  ConstTensor6View(data, v, s, b, p, r, c)
2681 {
2682  // Nothing to do here.
2683 }
2684 
2708  const Range& pv,
2709  const Range& ps,
2710  const Range& pb,
2711  const Range& pp,
2712  const Range& pr,
2713  const Range& pc,
2714  const Range& nv,
2715  const Range& ns,
2716  const Range& nb,
2717  const Range& np,
2718  const Range& nr,
2719  const Range& nc) :
2720  ConstTensor6View(data,pv,ps,pb,pp,pr,pc,nv,ns,nb,np,nr,nc)
2721 {
2722  // Nothing to do here.
2723 }
2724 
2729 void copy(ConstIterator6D origin,
2730  const ConstIterator6D& end,
2731  Iterator6D target)
2732 {
2733  for ( ; origin!=end ; ++origin,++target )
2734  {
2735  // We use the copy function for the next smaller rank of tensor
2736  // recursively:
2737  copy(origin->begin(),
2738  origin->end(),
2739  target->begin());
2740  }
2741 }
2742 
2744 void copy(Numeric x,
2745  Iterator6D target,
2746  const Iterator6D& end)
2747 {
2748  for ( ; target!=end ; ++target )
2749  {
2750  // We use the copy function for the next smaller rank of tensor
2751  // recursively:
2752  copy(x,target->begin(),target->end());
2753  }
2754 }
2755 
2756 
2757 // Functions for Tensor6:
2758 // ---------------------
2759 
2763 {
2764  // Nothing to do here. However, note that the default constructor
2765  // for Tensor6View has been called in the initializer list. That is
2766  // crucial, otherwise internal range objects will not be properly
2767  // initialized.
2768 }
2769 
2773  Index p, Index r, Index c) :
2774  Tensor6View( new Numeric[v*s*b*p*r*c],
2775  Range(0,v,s*b*p*r*c),
2776  Range(0,s,b*p*r*c),
2777  Range(0,b,p*r*c),
2778  Range(0,p,r*c),
2779  Range(0,r,c),
2780  Range(0,c))
2781 {
2782  // Nothing to do here.
2783 }
2784 
2787  Index p, Index r, Index c, Numeric fill) :
2788  Tensor6View( new Numeric[v*s*b*p*r*c],
2789  Range(0,v,s*b*p*r*c),
2790  Range(0,s,b*p*r*c),
2791  Range(0,b,p*r*c),
2792  Range(0,p,r*c),
2793  Range(0,r,c),
2794  Range(0,c))
2795 {
2796  // Here we can access the raw memory directly, for slightly
2797  // increased efficiency:
2798  const Numeric *stop = mdata+v*s*b*p*r*c;
2799  for ( Numeric *x=mdata; x<stop; ++x )
2800  *x = fill;
2801 }
2802 
2806  Tensor6View( new Numeric[m.nvitrines()*m.nshelves()*m.nbooks()
2807  *m.npages()*m.nrows()*m.ncols()],
2808  Range( 0, m.nvitrines(), m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2809  Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2810  Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2811  Range( 0, m.npages(), m.nrows()*m.ncols() ),
2812  Range( 0, m.nrows(), m.ncols() ),
2813  Range( 0, m.ncols() ) )
2814 {
2815  copy(m.begin(),m.end(),begin());
2816 }
2817 
2821  Tensor6View( new Numeric[m.nvitrines()*m.nshelves()*m.nbooks()
2822  *m.npages()*m.nrows()*m.ncols()],
2823  Range( 0, m.nvitrines(), m.nshelves()*m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2824  Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2825  Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2826  Range( 0, m.npages(), m.nrows()*m.ncols() ),
2827  Range( 0, m.nrows(), m.ncols() ),
2828  Range( 0, m.ncols() ) )
2829 {
2830  // There is a catch here: If m is an empty tensor, then it will have
2831  // dimensions of size 0. But these are used to initialize the stride
2832  // for higher dimensions! Thus, this method has to be consistent
2833  // with the behaviour of Range::Range. For now, Range::Range allows
2834  // also stride 0.
2835  copy(m.begin(),m.end(),begin());
2836 }
2837 
2839 
2863 {
2864  swap(*this, x);
2865  return *this;
2866 }
2867 
2871 {
2872  copy( x, begin(), end() );
2873  return *this;
2874 }
2875 
2880  Index p, Index r, Index c)
2881 {
2882  assert( 0<=v );
2883  assert( 0<=s );
2884  assert( 0<=b );
2885  assert( 0<=p );
2886  assert( 0<=r );
2887  assert( 0<=c );
2888 
2889  if ( mvr.mextent!=v ||
2890  msr.mextent!=s ||
2891  mbr.mextent!=b ||
2892  mpr.mextent!=p ||
2893  mrr.mextent!=r ||
2894  mcr.mextent!=c )
2895  {
2896  delete[] mdata;
2897  mdata = new Numeric[v*s*b*p*r*c];
2898 
2899  mvr.mstart = 0;
2900  mvr.mextent = v;
2901  mvr.mstride = s*b*p*r*c;
2902 
2903  msr.mstart = 0;
2904  msr.mextent = s;
2905  msr.mstride = b*p*r*c;
2906 
2907  mbr.mstart = 0;
2908  mbr.mextent = b;
2909  mbr.mstride = p*r*c;
2910 
2911  mpr.mstart = 0;
2912  mpr.mextent = p;
2913  mpr.mstride = r*c;
2914 
2915  mrr.mstart = 0;
2916  mrr.mextent = r;
2917  mrr.mstride = c;
2918 
2919  mcr.mstart = 0;
2920  mcr.mextent = c;
2921  mcr.mstride = 1;
2922  }
2923 }
2924 
2925 
2927 void swap(Tensor6& t1, Tensor6& t2)
2928 {
2929  std::swap(t1.mvr, t2.mvr);
2930  std::swap(t1.msr, t2.msr);
2931  std::swap(t1.mbr, t2.mbr);
2932  std::swap(t1.mpr, t2.mpr);
2933  std::swap(t1.mrr, t2.mrr);
2934  std::swap(t1.mcr, t2.mcr);
2935  std::swap(t1.mdata, t2.mdata);
2936 }
2937 
2938 
2942 {
2943 // cout << "Destroying a Tensor6:\n"
2944 // << *this << "\n........................................\n";
2945  delete[] mdata;
2946 }
2947 
2948 
2965  double (&my_func)(double),
2966  ConstTensor6View x )
2967 {
2968  // Check dimensions:
2969  assert( y.nvitrines() == x.nvitrines() );
2970  assert( y.nshelves() == x.nshelves() );
2971  assert( y.nbooks() == x.nbooks() );
2972  assert( y.npages() == x.npages() );
2973  assert( y.nrows() == x.nrows() );
2974  assert( y.ncols() == x.ncols() );
2975 
2976  const ConstIterator6D xe = x.end();
2977  ConstIterator6D xi = x.begin();
2978  Iterator6D yi = y.begin();
2979  for ( ; xi!=xe; ++xi, ++yi )
2980  {
2981  // Use the transform function of lower dimensional tensors
2982  // recursively:
2983  transform(*yi,my_func,*xi);
2984  }
2985 }
2986 
2989 {
2990  const ConstIterator6D xe = x.end();
2991  ConstIterator6D xi = x.begin();
2992 
2993  // Initial value for max:
2994  Numeric themax = max(*xi);
2995  ++xi;
2996 
2997  for ( ; xi!=xe ; ++xi )
2998  {
2999  // Use the max function of lower dimensional tensors
3000  // recursively:
3001  Numeric maxi = max(*xi);
3002  if ( maxi > themax )
3003  themax = maxi;
3004  }
3005 
3006  return themax;
3007 }
3008 
3011 {
3012  const ConstIterator6D xe = x.end();
3013  ConstIterator6D xi = x.begin();
3014 
3015  // Initial value for min:
3016  Numeric themin = min(*xi);
3017  ++xi;
3018 
3019  for ( ; xi!=xe ; ++xi )
3020  {
3021  // Use the min function of lower dimensional tensors
3022  // recursively:
3023  Numeric mini = min(*xi);
3024  if ( mini < themin )
3025  themin = mini;
3026  }
3027 
3028  return themin;
3029 }
3030 
3031 
3033 // Helper function for debugging
3034 #ifndef NDEBUG
3035 
3054  Index p, Index r, Index c)
3055 {
3056  return tv(v, s, b, p, r, c);
3057 }
3058 
3059 #endif
3060 
friend class Tensor6View
Definition: matpackVI.h:404
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
#define OFFSET(x)
Definition: matpackVI.h:34
The VectorView class.
Definition: matpackI.h:372
ConstIterator6D begin() const
Return const iterator to sub-tensor.
Definition: matpackVI.cc:2423
The outermost iterator class for rank 6 tensors.
Definition: matpackVI.h:38
Index mstride
The stride.
Definition: matpackI.h:209
The Tensor4View class.
Definition: matpackIV.h:243
Range mcr
The column range of mdata that is actually used.
Definition: matpackVI.h:435
Index mstart
The start index.
Definition: matpackI.h:204
Numeric debug_tensor6view_get_elem(Tensor6View &tv, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Definition: matpackVI.cc:3053
The MatrixView class.
Definition: matpackI.h:679
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVI.cc:32
A constant view of a Tensor6.
Definition: matpackVI.h:159
Tensor6View & operator/=(Numeric x)
Division by scalar.
Definition: matpackVI.cc:2536
The range class.
Definition: matpackI.h:148
Const version of Iterator6D.
Definition: matpackVI.h:90
virtual ~Tensor6()
Destructor for Tensor6.
Definition: matpackVI.cc:2941
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVI.cc:911
Range msr
The shelf range of mdata that is actually used.
Definition: matpackVI.h:427
void swap(Tensor6 &t1, Tensor6 &t2)
Swaps two objects.
Definition: matpackVI.cc:2927
The Tensor6View class.
Definition: matpackVI.h:449
friend void swap(Tensor6 &t1, Tensor6 &t2)
Swaps two objects.
Definition: matpackVI.cc:2927
ConstIterator5D end() const
Return const iterator behind last shelf.
Definition: matpackV.cc:800
Tensor6()
Default constructor.
Definition: matpackVI.cc:2761
A constant view of a Tensor4.
Definition: matpackIV.h:141
Range mbr
The book range of mdata that is actually used.
Definition: matpackVI.h:429
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Definition: matpackVI.cc:2429
Tensor6View & operator*=(Numeric x)
Multiplication by scalar.
Definition: matpackVI.cc:2525
ConstTensor6View()
Default constructor.
Definition: matpackVI.cc:943
Tensor6View & operator+=(Numeric x)
Addition of scalar.
Definition: matpackVI.cc:2547
#define CHECK(x)
Implementation of Tensors of Rank 6.
Definition: matpackVI.h:33
The Tensor3View class.
Definition: matpackIII.h:232
Numeric max(const ConstTensor6View &x)
Max function, tensor version.
Definition: matpackVI.cc:2988
ConstIterator5D end() const
Return const iterator behind last shelf.
Definition: matpackV.cc:2012
std::ostream & operator<<(std::ostream &os, const ConstTensor6View &v)
Output operator.
Definition: matpackVI.cc:1007
The declarations of all the exception classes.
Range mrr
The row range of mdata that is actually used.
Definition: matpackVI.h:433
Index nrows() const
Returns the number of rows.
Definition: matpackVI.cc:56
Tensor6View & operator-=(Numeric x)
Subtraction of scalar.
Definition: matpackVI.cc:2558
A constant view of a Tensor5.
Definition: matpackV.h:152
Tensor6View & operator=(const ConstTensor6View &v)
Assignment operator.
Definition: matpackVI.cc:2463
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
ConstIterator5D begin() const
Return const iterator to first shelf.
Definition: matpackV.cc:792
Tensor6View()
Default constructor.
Definition: matpackVI.cc:2664
Index mextent
The number of elements.
Definition: matpackI.h:207
The Tensor5View class.
Definition: matpackV.h:276
ConstIterator6D begin() const
Return const iterator to first sub-tensor.
Definition: matpackVI.cc:899
ConstIterator5D begin() const
Return const iterator to first shelf.
Definition: matpackV.cc:2006
Index nshelves() const
Returns the number of shelves.
Definition: matpackVI.cc:38
Index ncols() const
Returns the number of columns.
Definition: matpackVI.cc:62
Numeric * mdata
Pointer to the plain C array that holds the data.
Definition: matpackVI.h:437
Range mvr
The vitrine range of mdata that is actually used.
Definition: matpackVI.h:425
void copy(ConstIterator6D origin, const ConstIterator6D &end, Iterator6D target)
Copy data between begin and end to target.
Definition: matpackVI.cc:2729
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackVI.cc:2407
#define ns
Definition: continua.cc:21931
A constant view of a Tensor3.
Definition: matpackIII.h:139
The Tensor6 class.
Definition: matpackVI.h:950
A constant view of a Vector.
Definition: matpackI.h:292
Index npages() const
Returns the number of pages.
Definition: matpackVI.cc:50
Tensor6 & operator=(Tensor6 x)
Assignment operator from another tensor.
Definition: matpackVI.cc:2862
Range mpr
The page range of mdata that is actually used.
Definition: matpackVI.h:431
A constant view of a Matrix.
Definition: matpackI.h:596
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVI.cc:2879
Numeric min(const ConstTensor6View &x)
Min function, tensor version.
Definition: matpackVI.cc:3010
void transform(Tensor6View y, double(&my_func)(double), ConstTensor6View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Definition: matpackVI.cc:2964
ConstTensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Definition: matpackVI.cc:72
Index nbooks() const
Returns the number of books.
Definition: matpackVI.cc:44