annotate main/fixed/src/fixedNDArray.h @ 3272:17e102866239 octave-forge

FSF address update
author adb014
date Fri, 23 Mar 2007 20:59:58 +0000
parents 73fa4496fb07
children 529c00d3210c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
1 /*
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
2
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
3 Copyright (C) 2004 Motorola Inc
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
4 Copyright (C) 2004 David Bateman
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
5
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
6 This program is free software; you can redistribute it and/or modify it
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
9 later version.
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
10
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
11 This program is distributed in the hope that it will be useful, but WITHOUT
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
14 for more details.
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
15
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
17 along with this program; see the file COPYING. If not, write to the Free
3272
17e102866239 FSF address update
adb014
parents: 3268
diff changeset
18 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
19
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
20 In addition to the terms of the GPL, you are permitted to link
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
21 this program with any Open Source program, as defined by the
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
22 Open Source Initiative (www.opensource.org)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
23
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
24 */
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
25
2394
1728eb2120ef First cut at reworking fixed toolbox for package manager. Probably non-working
adb014
parents: 2383
diff changeset
26 #if !defined (octave_FixedNDArray_h)
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
27 #define octave_FixedNDArray_h 1
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
28
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
29 #include <octave/MArrayN.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
30 #include <octave/dMatrix.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
31 #include <octave/dNDArray.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
32 #include <octave/boolNDArray.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
33
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
34 #include <octave/mx-defs.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
35 #include <octave/mx-op-defs.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
36
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
37 #include <octave/data-conv.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
38 #include <octave/mach-info.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
39
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
40 #include "int/fixed.h"
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
41 #include "fixedMatrix.h"
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
42
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
43 class FixedComplexNDArray;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
44
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
45 class
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
46 FixedNDArray : public MArrayN<FixedPoint>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
47 {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
48 public:
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
49 FixedNDArray (void) : MArrayN<FixedPoint> () { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
50
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
51 FixedNDArray (const dim_vector& dv) : MArrayN<FixedPoint> (dv) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
52
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
53 FixedNDArray (const dim_vector& dv, const FixedPoint val)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
54 : MArrayN<FixedPoint> (dv, val) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
55
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
56 FixedNDArray (const MArrayN<int> &is, const MArrayN<int> &ds);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
57
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
58 FixedNDArray (const NDArray &is, const NDArray &ds);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
59
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
60 FixedNDArray (unsigned int is, unsigned int ds, const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
61
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
62 FixedNDArray (const MArrayN<int> &is, const MArrayN<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
63 const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
64
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
65 FixedNDArray (const NDArray &is, const NDArray &ds, const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
66
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
67 FixedNDArray (unsigned int is, unsigned int ds, const NDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
68
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
69 FixedNDArray (const MArrayN<int> &is, const MArrayN<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
70 const NDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
71
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
72 FixedNDArray (const NDArray &is, const NDArray &ds, const NDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
73
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
74 FixedNDArray (unsigned int is, unsigned int ds, const NDArray& a,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
75 const NDArray& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
76
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
77 FixedNDArray (const MArrayN<int> &is, const MArrayN<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
78 const NDArray& a, const NDArray& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
79
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
80 FixedNDArray (const NDArray &is, const NDArray &ds, const NDArray& a,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
81 const NDArray& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
82
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
83 FixedNDArray (const MArrayN<int> &a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
84
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
85 FixedNDArray (const NDArray &a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
86
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
87 FixedNDArray (const FixedNDArray& a) : MArrayN<FixedPoint> (a) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
88 FixedNDArray (const MArrayN<FixedPoint>& a) : MArrayN<FixedPoint> (a) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
89 FixedNDArray (const ArrayN<FixedPoint>& a) : MArrayN<FixedPoint> (a) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
90
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
91 NDArray sign (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
92 NDArray signbit (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
93 NDArray getdecsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
94 NDArray getintsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
95 NDArray getnumber (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
96 NDArray fixedpoint (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
97 FixedNDArray chdecsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
98 FixedNDArray chdecsize (const NDArray &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
99 FixedNDArray chintsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
100 FixedNDArray chintsize (const NDArray &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
101 FixedNDArray incdecsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
102 FixedNDArray incdecsize (const NDArray &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
103 FixedNDArray incdecsize ();
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
104 FixedNDArray incintsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
105 FixedNDArray incintsize (const NDArray &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
106 FixedNDArray incintsize ();
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
107
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
108 FixedNDArray& operator = (const FixedNDArray& a)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
109 {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
110 MArrayN<FixedPoint>::operator = (a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
111 return *this;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
112 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
113
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
114 bool operator == (const FixedNDArray& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
115 bool operator != (const FixedNDArray& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
116
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
117 FixedNDArray operator ! (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
118
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
119 boolNDArray all (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
120 boolNDArray any (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
121
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
122 FixedNDArray concat (const FixedNDArray& rb, const Array<octave_idx_type>& ra_idx);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
123 FixedComplexNDArray concat (const FixedComplexNDArray& rb,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
124 const Array<octave_idx_type>& ra_idx);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
125
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
126 FixedNDArray& insert (const FixedNDArray& a, const Array<octave_idx_type>& ra_idx);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
127
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
128 FixedNDArray cumprod (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
129 FixedNDArray cumsum (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
130 FixedNDArray prod (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
131 FixedNDArray sum (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
132 FixedNDArray sumsq (octave_idx_type dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
133
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
134 FixedNDArray max (octave_idx_type dim = 0) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
135 FixedNDArray max (ArrayN<octave_idx_type>& index, octave_idx_type dim = 0) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
136 FixedNDArray min (octave_idx_type dim = 0) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
137 FixedNDArray min (ArrayN<octave_idx_type>& index, octave_idx_type dim = 0) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
138
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
139 FixedNDArray abs (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
140
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
141 FixedMatrix fixed_matrix_value (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
142
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
143 FixedNDArray squeeze (void) const { return ArrayN<FixedPoint>::squeeze (); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
144
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
145 static void increment_index (Array<octave_idx_type>& ra_idx,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
146 const dim_vector& dimensions,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
147 octave_idx_type start_dimension = 0);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
148
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
149 static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
150 const dim_vector& dimensions);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
151
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
152 // friend FixedNDArray abs (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
153 friend FixedNDArray cos (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
154 friend FixedNDArray cosh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
155 friend FixedNDArray sin (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
156 friend FixedNDArray sinh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
157 friend FixedNDArray tan (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
158 friend FixedNDArray tanh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
159
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
160 friend FixedNDArray sqrt (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
161 friend FixedNDArray exp (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
162 friend FixedNDArray log (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
163 friend FixedNDArray log10 (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
164
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
165 friend FixedNDArray atan2 (const FixedNDArray &x, const FixedNDArray &y);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
166
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
167 friend FixedNDArray round (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
168 friend FixedNDArray rint (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
169 friend FixedNDArray floor (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
170 friend FixedNDArray ceil (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
171
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
172 friend FixedNDArray real (const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
173 friend FixedNDArray imag (const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
174 friend FixedNDArray conj (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
175
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
176 friend NDArray fixedpoint (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
177 friend NDArray sign (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
178 friend NDArray signbit (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
179 friend NDArray getdecsize (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
180 friend NDArray getintsize (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
181 friend NDArray getnumber (const FixedNDArray& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
182
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
183 // i/o
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
184
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
185 friend std::ostream& operator << (std::ostream& os, const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
186 friend std::istream& operator >> (std::istream& is, FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
187
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
188 static FixedPoint resize_fill_value (void) { return FixedPoint(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
189
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
190 private:
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
191
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
192 FixedNDArray (FixedPoint *d, const dim_vector& dv) : MArrayN<FixedPoint> (d, dv) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
193
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
194 };
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
195
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
196 // FixedNDArray abs (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
197 FixedNDArray cos (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
198 FixedNDArray cosh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
199 FixedNDArray sin (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
200 FixedNDArray sinh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
201 FixedNDArray tan (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
202 FixedNDArray tanh (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
203
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
204 FixedNDArray sqrt (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
205 FixedNDArray exp (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
206 FixedNDArray log (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
207 FixedNDArray log10 (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
208
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
209 FixedNDArray atan2 (const FixedNDArray &x, const FixedNDArray &y);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
210
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
211 FixedNDArray round (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
212 FixedNDArray rint (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
213 FixedNDArray floor (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
214 FixedNDArray ceil (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
215
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
216 FixedNDArray real (const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
217 FixedNDArray imag (const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
218 FixedNDArray conj (const FixedNDArray &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
219
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
220 inline NDArray fixedpoint (const FixedNDArray& x) { return x.fixedpoint(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
221 inline NDArray sign (const FixedNDArray& x) { return x.sign(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
222 inline NDArray signbit (const FixedNDArray& x) { return x.signbit(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
223 inline NDArray getdecsize (const FixedNDArray& x) { return x.getdecsize(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
224 inline NDArray getintsize (const FixedNDArray& x) { return x.getintsize(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
225 inline NDArray getnumber (const FixedNDArray& x) { return x.getnumber(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
226
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
227 std::ostream& operator << (std::ostream& os, const FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
228 std::istream& operator >> (std::istream& is, FixedNDArray& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
229
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
230 FixedNDArray min (double d, const FixedNDArray& m);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
231 FixedNDArray min (const FixedNDArray& m, double d);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
232 FixedNDArray min (const FixedNDArray& a, const FixedNDArray& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
233
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
234 FixedNDArray max (double d, const FixedNDArray& m);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
235 FixedNDArray max (const FixedNDArray& m, double d);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
236 FixedNDArray max (const FixedNDArray& a, const FixedNDArray& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
237
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
238 FixedNDArray elem_pow (const FixedNDArray &a, const FixedNDArray &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
239 FixedNDArray elem_pow (const FixedNDArray &a, const FixedPoint &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
240 FixedNDArray elem_pow (const FixedPoint &a, const FixedNDArray &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
241
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
242 NDS_CMP_OP_DECLS (FixedNDArray, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
243 NDS_BOOL_OP_DECLS (FixedNDArray, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
244
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
245 SND_CMP_OP_DECLS (FixedPoint, FixedNDArray)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
246 SND_BOOL_OP_DECLS (FixedPoint, FixedNDArray)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
247
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
248 NDND_CMP_OP_DECLS (FixedNDArray, FixedNDArray)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
249 NDND_BOOL_OP_DECLS (FixedNDArray, FixedNDArray)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
250
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
251 MARRAY_FORWARD_DEFS (MArrayN, FixedNDArray, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
252
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
253 #endif
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
254
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
255 /*
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
256 ;;; Local Variables: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
257 ;;; mode: C++ ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
258 ;;; End: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
259 */