annotate liboctave/Array2.h @ 10312:cbc402e64d83

untabify liboctave header files
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:14:48 -0500
parents 4c0cdbe0acca
children 12884915a8e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1993
1b57120c997b [project @ 1996-03-03 01:16:15 by jwe]
jwe
parents: 1988
diff changeset
1 // Template array classes
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
2 /*
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
3
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
4 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8579
diff changeset
5 2005, 2007, 2008, 2009 John W. Eaton
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
6
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
7 This file is part of Octave.
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
8
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
9 Octave is free software; you can redistribute it and/or modify it
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6990
diff changeset
11 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6990
diff changeset
12 option) any later version.
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
13
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
14 Octave is distributed in the hope that it will be useful, but WITHOUT
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
17 for more details.
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
18
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6990
diff changeset
20 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6990
diff changeset
21 <http://www.gnu.org/licenses/>.
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
22
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
23 */
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
24
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
25 #if !defined (octave_Array2_h)
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
26 #define octave_Array2_h 1
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
27
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
28 #include <cassert>
3473
64f8babb7b3d [project @ 2000-01-25 09:44:15 by jwe]
jwe
parents: 3472
diff changeset
29 #include <climits>
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
30 #include <cstdlib>
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
31
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
32 #include "Array.h"
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
33 #include "lo-error.h"
7231
2eb392d058bb [project @ 2007-11-30 18:53:29 by jwe]
jwe
parents: 7017
diff changeset
34 #include "lo-math.h"
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
35
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
36 class idx_vector;
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
37
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
38 // Two dimensional array class.
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
39
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
40 template <class T>
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3492
diff changeset
41 class
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3492
diff changeset
42 Array2 : public Array<T>
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
43 {
3492
17261f602206 [project @ 2000-01-28 22:48:51 by jwe]
jwe
parents: 3473
diff changeset
44 protected:
3473
64f8babb7b3d [project @ 2000-01-25 09:44:15 by jwe]
jwe
parents: 3472
diff changeset
45
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
46 Array2 (T *d, octave_idx_type r, octave_idx_type c) : Array<T> (d, dim_vector (r, c)) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
47
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
48 public:
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
49
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
50 Array2 (void) : Array<T> (dim_vector (0, 0)) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
51
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
52 Array2 (octave_idx_type r, octave_idx_type c) : Array<T> (dim_vector (r, c)) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
53
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
54 Array2 (octave_idx_type r, octave_idx_type c, const T& val)
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
55 : Array<T> (dim_vector (r, c), val) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
56
6990
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
57 Array2 (const dim_vector& dv) : Array<T> (dv)
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
58 {
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
59 if (dv.length () != 2)
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
60 (*current_liboctave_error_handler) ("too many dimensions");
6990
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
61 }
6979
2883ea1c5c18 [project @ 2007-10-08 20:23:48 by dbateman]
dbateman
parents: 5307
diff changeset
62
6990
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
63 Array2 (const dim_vector& dv, const T& val) : Array<T> (dv)
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
64 {
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
65 if (dv.length () != 2)
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
66 (*current_liboctave_error_handler) ("too many dimensions");
6990
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
67 else
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
68 Array<T>::fill (val);
6990
9dc99ab00c86 [project @ 2007-10-09 20:39:54 by dbateman]
dbateman
parents: 6979
diff changeset
69 }
6979
2883ea1c5c18 [project @ 2007-10-08 20:23:48 by dbateman]
dbateman
parents: 5307
diff changeset
70
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
71 Array2 (const Array2<T>& a) : Array<T> (a, a.dims ()) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
72
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
73 Array2 (const Array<T>& a, octave_idx_type r, octave_idx_type c)
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
74 : Array<T> (a, dim_vector (r, c)) { }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
75
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
76 template <class U>
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
77 Array2 (const Array<U>& a) : Array<T> (a) { }
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
78
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
79 template <class U>
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
80 Array2 (const Array<U>& a, const dim_vector& dv)
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
81 : Array<T> (a, dv) { }
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
82
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
83 ~Array2 (void) { }
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
84
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
85 Array2<T>& operator = (const Array2<T>& a)
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
86 {
3832
39aee8115584 [project @ 2001-05-15 17:14:14 by jwe]
jwe
parents: 3665
diff changeset
87 if (this != &a)
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
88 Array<T>::operator = (a);
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
89
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
90 return *this;
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
91 }
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
92
8290
7cbe01c21986 improve dense array indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 7789
diff changeset
93 void resize (octave_idx_type r, octave_idx_type c)
7cbe01c21986 improve dense array indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 7789
diff changeset
94 { Array<T>::resize_fill (r, c, Array<T>::resize_fill_value ()); }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3585
diff changeset
95
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
96 void resize (octave_idx_type r, octave_idx_type c, const T& val)
8290
7cbe01c21986 improve dense array indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 7789
diff changeset
97 { Array<T>::resize_fill (r, c, val); }
2109
356f70c8fcbd [project @ 1996-04-30 12:31:30 by jwe]
jwe
parents: 2006
diff changeset
98
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
99 Array2<T>& insert (const Array2<T>& a, octave_idx_type r, octave_idx_type c)
2006
95e952f72d66 [project @ 1996-03-04 00:33:32 by jwe]
jwe
parents: 2005
diff changeset
100 {
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
101 Array<T>::insert (a, r, c);
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
102 return *this;
2006
95e952f72d66 [project @ 1996-03-04 00:33:32 by jwe]
jwe
parents: 2005
diff changeset
103 }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
104
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
105 Array2<T> transpose (void) const
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
106 {
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
107 Array<T> tmp = Array<T>::transpose ();
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
108 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
109 }
2382
58e5955495d7 [project @ 1996-10-12 17:45:06 by jwe]
jwe
parents: 2306
diff changeset
110
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
111 Array2<T> hermitian (T (*fcn) (const T&) = 0) const
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
112 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
113 Array<T> tmp = Array<T>::hermitian (fcn);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
114 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
115 }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7620
diff changeset
116
8579
7e0f36dfefbe implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents: 8367
diff changeset
117 Array2<T> index (const idx_vector& i, bool resize_ok = false,
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
118 const T& rfv = Array<T>::resize_fill_value ()) const
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
119 {
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
120 Array<T> tmp = Array<T>::index (i, resize_ok, rfv);
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
121 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
122 }
2382
58e5955495d7 [project @ 1996-10-12 17:45:06 by jwe]
jwe
parents: 2306
diff changeset
123
8579
7e0f36dfefbe implement octave_value_list using Array
Jaroslav Hajek <highegg@gmail.com>
parents: 8367
diff changeset
124 Array2<T> index (const idx_vector& i, const idx_vector& j, bool resize_ok = false,
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
125 const T& rfv = Array<T>::resize_fill_value ()) const
4513
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
126 {
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
127 Array<T> tmp = Array<T>::index (i, j, resize_ok, rfv);
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
128 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
508238e65af7 [project @ 2003-09-19 21:40:57 by jwe]
jwe
parents: 4461
diff changeset
129 }
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
130
7463
2467639bd8c0 eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents: 7433
diff changeset
131 Array2<T> sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
132 {
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
133 Array<T> tmp = Array<T>::sort (dim, mode);
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
134 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
135 }
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
136
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
137 Array2<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0,
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
138 sortmode mode = ASCENDING) const
7433
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
139 {
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
140 Array<T> tmp = Array<T>::sort (sidx, dim, mode);
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
141 return Array2<T> (tmp, tmp.rows (), tmp.columns ());
402168152bb9 [project @ 2008-01-31 18:59:09 by dbateman]
dbateman
parents: 7231
diff changeset
142 }
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7463
diff changeset
143
7620
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7503
diff changeset
144 Array2<T> diag (octave_idx_type k) const
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7503
diff changeset
145 {
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7503
diff changeset
146 return Array<T>::diag (k);
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7503
diff changeset
147 }
36594d5bbe13 Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents: 7503
diff changeset
148
9812
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
149 // FIXME: should go away.
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
150 template <class U>
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
151 Array2<U>
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
152 map (U (&fcn) (T)) const
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
153 { return Array<T>::template map<U> (fcn); }
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
154
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
155 template <class U>
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
156 Array2<U>
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
157 map (U (&fcn) (const T&)) const
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
158 { return Array<T>::template map<U> (fcn); }
1988
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
159 };
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
160
7b56630a1e05 [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents:
diff changeset
161 #endif