annotate main/fixed/src/fixedMatrix.h @ 2394:1728eb2120ef octave-forge

First cut at reworking fixed toolbox for package manager. Probably non-working
author adb014
date Tue, 22 Aug 2006 20:15:42 +0000
parents d1930f8af7ca
children c9748be75a06
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) 2003 Motorola Inc
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
4 Copyright (C) 2003 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
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
26 #if !defined (octave_FixedMatrix_h)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
27 #define octave_FixedMatrix_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/MArray2.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
30
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
31 #include <octave/mx-defs.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
32 #include <octave/mx-op-defs.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
33 #include <octave/data-conv.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
34 #include <octave/mach-info.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
35 #include <octave/boolMatrix.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
36 #include <octave/dMatrix.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
37
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
38 #include "int/fixed.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 class FixedComplexMatrix;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
41
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
42 #if !defined(octave_FixedColVector_h)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
43 class FixedColumnVector;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
44 #endif
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
45 #if !defined(octave_FixedRowVector_h)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
46 class FixedRowVector;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
47 #endif
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
48
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
49 typedef FixedPoint (*f_f_Mapper)(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 class
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
52 FixedMatrix : public MArray2<FixedPoint>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
53 {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
54 public:
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 FixedMatrix (void) : MArray2<FixedPoint> () { }
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 FixedMatrix (int r, int c) : MArray2<FixedPoint> (r, c) { }
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 FixedMatrix (int r, int c, const FixedPoint val) : MArray2<FixedPoint> (r, c, val) { }
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 FixedMatrix (const MArray2<int> &is, const MArray2<int> &ds);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
63
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
64 FixedMatrix (const Matrix &is, const Matrix &ds);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
65
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
66 FixedMatrix (unsigned int is, unsigned int ds, const FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
67
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
68 FixedMatrix (const MArray2<int> &is, const MArray2<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
69 const FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
70
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
71 FixedMatrix (const Matrix &is, const Matrix &ds, const FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
72
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
73 FixedMatrix (unsigned int is, unsigned int ds, const Matrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
74
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
75 FixedMatrix (const MArray2<int> &is, const MArray2<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
76 const Matrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
77
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
78 FixedMatrix (const Matrix &is, const Matrix &ds, const Matrix& a);
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 FixedMatrix (unsigned int is, unsigned int ds, const Matrix& a,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
81 const Matrix& 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 FixedMatrix (const MArray2<int> &is, const MArray2<int> &ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
84 const Matrix& a, const Matrix& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
85
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
86 FixedMatrix (const Matrix &is, const Matrix &ds, const Matrix& a,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
87 const Matrix& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
88
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
89 FixedMatrix (const MArray2<int> &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 FixedMatrix (const Matrix &a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
92
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
93 FixedMatrix (const FixedMatrix& a) : MArray2<FixedPoint> (a) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
94 FixedMatrix (const MArray2<FixedPoint>& a) : MArray2<FixedPoint> (a) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
95
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
96 explicit FixedMatrix (const FixedRowVector& rv);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
97
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
98 explicit FixedMatrix (const FixedColumnVector& cv);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
99
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
100 Matrix sign (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
101 Matrix signbit (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
102 Matrix getdecsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
103 Matrix getintsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
104 Matrix getnumber (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
105 Matrix fixedpoint (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
106 FixedMatrix chdecsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
107 FixedMatrix chdecsize (const Matrix &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
108 FixedMatrix chintsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
109 FixedMatrix chintsize (const Matrix &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
110 FixedMatrix incdecsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
111 FixedMatrix incdecsize (const Matrix &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
112 FixedMatrix incdecsize ();
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
113 FixedMatrix incintsize (const double n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
114 FixedMatrix incintsize (const Matrix &n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
115 FixedMatrix incintsize ();
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 FixedMatrix& operator = (const FixedMatrix& a)
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 MArray2<FixedPoint>::operator = (a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
120 return *this;
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
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
123 bool operator == (const FixedMatrix& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
124 bool operator != (const FixedMatrix& a) const;
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 bool is_symmetric (void) const;
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 FixedMatrix concat (const FixedMatrix& rb, const Array<int>& ra_idx);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
129 FixedComplexMatrix concat (const FixedComplexMatrix& rb,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
130 const Array<int>& ra_idx);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
131
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
132 // destructive insert/delete/reorder operations
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 FixedMatrix& insert (const FixedMatrix& a, int r, int c);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
135 FixedMatrix& insert (const FixedRowVector& a, int r, int c);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
136 FixedMatrix& insert (const FixedColumnVector& a, int r, int c);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
137
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
138 FixedMatrix& fill (FixedPoint val);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
139 FixedMatrix& fill (FixedPoint val, int r1, int c1, int r2, int c2);
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 append (const FixedMatrix& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
142 FixedMatrix append (const FixedRowVector& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
143 FixedMatrix append (const FixedColumnVector& a) const;
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 FixedMatrix stack (const FixedMatrix& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
146 FixedMatrix stack (const FixedRowVector& a) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
147 FixedMatrix stack (const FixedColumnVector& a) const;
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 FixedMatrix transpose (void) const
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
150 { return MArray2<FixedPoint>::transpose (); }
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 // resize is the destructive equivalent for this one
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
153
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
154 FixedMatrix extract (int r1, int c1, int r2, int c2) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
155
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
156 FixedMatrix extract_n (int r1, int c1, int nr, int nc) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
157
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
158 // extract row or column i.
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 FixedRowVector row (int i) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
161 FixedRowVector row (char *s) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
162
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
163 FixedColumnVector column (int i) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
164 FixedColumnVector column (char *s) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
165
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
166 // unary operations
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
167
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
168 FixedMatrix operator ! (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
169
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
170 // other operations
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 FixedMatrix map (f_f_Mapper f) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
173 FixedMatrix& apply (f_f_Mapper f);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
174
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
175 boolMatrix all (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
176 boolMatrix any (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
177
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
178 FixedMatrix cumprod (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
179 FixedMatrix cumsum (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
180 FixedMatrix prod (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
181 FixedMatrix sum (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
182 FixedMatrix sumsq (int dim = -1) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
183 FixedMatrix abs (void) const;
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 FixedColumnVector diag (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
186 FixedColumnVector diag (int k) const;
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 FixedColumnVector row_min (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
189 FixedColumnVector row_max (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
190
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
191 FixedColumnVector row_min (Array<int>& index) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
192 FixedColumnVector row_max (Array<int>& index) const;
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 FixedRowVector column_min (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
195 FixedRowVector column_max (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
196
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
197 FixedRowVector column_min (Array<int>& index) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
198 FixedRowVector column_max (Array<int>& index) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
199
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
200 friend FixedMatrix operator * (const FixedColumnVector& a, const FixedRowVector& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
201 friend FixedMatrix operator * (const FixedMatrix& a, const FixedMatrix& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
202
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
203 friend FixedMatrix real (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
204 friend FixedMatrix imag (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
205 friend FixedMatrix conj (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
206
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
207 friend FixedMatrix abs (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
208 friend FixedMatrix cos (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
209 friend FixedMatrix cosh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
210 friend FixedMatrix sin (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
211 friend FixedMatrix sinh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
212 friend FixedMatrix tan (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
213 friend FixedMatrix tanh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
214
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
215 friend FixedMatrix sqrt (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
216 friend FixedMatrix pow (const FixedMatrix &a, const int b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
217 friend FixedMatrix pow (const FixedMatrix &a, const double b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
218 friend FixedMatrix pow (const FixedMatrix &a, const FixedPoint &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
219 friend FixedMatrix pow (const FixedMatrix &a, const FixedMatrix &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
220 friend FixedMatrix exp (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
221 friend FixedMatrix log (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
222 friend FixedMatrix log10 (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
223
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
224 friend FixedMatrix atan2 (const FixedMatrix &x, const FixedMatrix &y);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
225
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
226 friend FixedMatrix round (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
227 friend FixedMatrix rint (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
228 friend FixedMatrix floor (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
229 friend FixedMatrix ceil (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
230
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
231 friend Matrix fixedpoint (const FixedMatrix& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
232 friend Matrix sign (const FixedMatrix& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
233 friend Matrix signbit (const FixedMatrix& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
234 friend Matrix getdecsize (const FixedMatrix& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
235 friend Matrix getintsize (const FixedMatrix& x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
236 friend Matrix getnumber (const FixedMatrix& x);
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 // i/o
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
239
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
240 friend std::ostream& operator << (std::ostream& os, const FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
241 friend std::istream& operator >> (std::istream& is, FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
242
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
243 static FixedPoint resize_fill_value (void) { return 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 private:
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
246
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
247 FixedMatrix (FixedPoint *d, int r, int c) : MArray2<FixedPoint> (d, r, c) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
248 };
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
249
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
250 FixedMatrix operator * (const FixedColumnVector& a, const FixedRowVector& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
251 FixedMatrix operator * (const FixedMatrix& a, const FixedMatrix& b);
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 FixedMatrix real (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
254 FixedMatrix imag (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
255 FixedMatrix conj (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
256
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
257 FixedMatrix abs (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
258 FixedMatrix cos (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
259 FixedMatrix cosh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
260 FixedMatrix sin (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
261 FixedMatrix sinh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
262 FixedMatrix tan (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
263 FixedMatrix tanh (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
264
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
265 FixedMatrix sqrt (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
266 FixedMatrix pow (const FixedMatrix &a, const int b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
267 FixedMatrix pow (const FixedMatrix &a, const double b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
268 FixedMatrix pow (const FixedMatrix &a, const FixedPoint &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
269 FixedMatrix pow (const FixedMatrix &a, const FixedMatrix &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
270 FixedMatrix exp (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
271 FixedMatrix log (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
272 FixedMatrix log10 (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
273
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
274 FixedMatrix atan2 (const FixedMatrix &x, const FixedMatrix &y);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
275
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
276 FixedMatrix round (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
277 FixedMatrix rint (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
278 FixedMatrix floor (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
279 FixedMatrix ceil (const FixedMatrix &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
280
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
281 inline Matrix fixedpoint (const FixedMatrix& x) { return x.fixedpoint(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
282 inline Matrix sign (const FixedMatrix& x) { return x.sign(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
283 inline Matrix signbit (const FixedMatrix& x) { return x.signbit(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
284 inline Matrix getdecsize (const FixedMatrix& x) { return x.getdecsize(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
285 inline Matrix getintsize (const FixedMatrix& x) { return x.getintsize(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
286 inline Matrix getnumber (const FixedMatrix& x) { return x.getnumber(); }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
287
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
288 std::ostream& operator << (std::ostream& os, const FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
289 std::istream& operator >> (std::istream& is, FixedMatrix& a);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
290
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
291 FixedMatrix min (FixedPoint d, const FixedMatrix& m);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
292 FixedMatrix min (const FixedMatrix& m, FixedPoint d);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
293 FixedMatrix min (const FixedMatrix& a, const FixedMatrix& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
294
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
295 FixedMatrix max (FixedPoint d, const FixedMatrix& m);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
296 FixedMatrix max (const FixedMatrix& m, FixedPoint d);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
297 FixedMatrix max (const FixedMatrix& a, const FixedMatrix& b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
298
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
299 FixedMatrix elem_pow (const FixedMatrix &a, const FixedMatrix &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
300 FixedMatrix elem_pow (const FixedMatrix &a, const FixedPoint &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
301 FixedMatrix elem_pow (const FixedPoint &a, const FixedMatrix &b);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
302
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
303
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
304 MS_CMP_OP_DECLS (FixedMatrix, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
305 MS_BOOL_OP_DECLS (FixedMatrix, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
306
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
307 SM_CMP_OP_DECLS (FixedPoint, FixedMatrix)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
308 SM_BOOL_OP_DECLS (FixedPoint, FixedMatrix)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
309
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
310 MM_CMP_OP_DECLS (FixedMatrix, FixedMatrix)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
311 MM_BOOL_OP_DECLS (FixedMatrix, FixedMatrix)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
312
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
313 MARRAY_FORWARD_DEFS (MArray2, FixedMatrix, FixedPoint)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
314
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
315 #endif
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
316
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
317 /*
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
318 ;;; Local Variables: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
319 ;;; mode: C++ ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
320 ;;; End: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
321 */