GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-norm.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2008-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_oct_norm_h)
27 #define octave_oct_norm_h 1
28 
29 #include "octave-config.h"
30 
31 #include "mx-fwd.h"
32 
33 #include "oct-cmplx.h"
34 
35 // The remaining includes can be removed when the deprecated functions
36 // at the end of this file are removed.
37 
38 #include "dColVector.h"
39 #include "dRowVector.h"
40 #include "fColVector.h"
41 #include "fRowVector.h"
42 
44 
45 extern OCTAVE_API double xnorm (const ColumnVector&, double p = 2);
46 extern OCTAVE_API double xnorm (const RowVector&, double p = 2);
47 extern OCTAVE_API double xnorm (const Matrix&, double p = 2);
48 extern OCTAVE_API double xfrobnorm (const Matrix&);
49 
50 extern OCTAVE_API double xnorm (const ComplexColumnVector&, double p = 2);
51 extern OCTAVE_API double xnorm (const ComplexRowVector&, double p = 2);
52 extern OCTAVE_API double xnorm (const ComplexMatrix&, double p = 2);
53 extern OCTAVE_API double xfrobnorm (const ComplexMatrix&);
54 
55 extern OCTAVE_API float xnorm (const FloatColumnVector&, float p = 2);
56 extern OCTAVE_API float xnorm (const FloatRowVector&, float p = 2);
57 extern OCTAVE_API float xnorm (const FloatMatrix&, float p = 2);
58 extern OCTAVE_API float xfrobnorm (const FloatMatrix&);
59 
60 extern OCTAVE_API float xnorm (const FloatComplexColumnVector&, float p = 2);
61 extern OCTAVE_API float xnorm (const FloatComplexRowVector&, float p = 2);
62 extern OCTAVE_API float xnorm (const FloatComplexMatrix&, float p = 2);
63 extern OCTAVE_API float xfrobnorm (const FloatComplexMatrix&);
64 
65 extern OCTAVE_API double xnorm (const SparseMatrix&, double p = 2);
66 extern OCTAVE_API double xfrobnorm (const SparseMatrix&);
67 
68 extern OCTAVE_API double xnorm (const SparseComplexMatrix&, double p = 2);
69 extern OCTAVE_API double xfrobnorm (const SparseComplexMatrix&);
70 
71 extern OCTAVE_API RowVector xcolnorms (const Matrix&, double p = 2);
72 extern OCTAVE_API ColumnVector xrownorms (const Matrix&, double p = 2);
73 
74 extern OCTAVE_API RowVector xcolnorms (const ComplexMatrix&, double p = 2);
75 extern OCTAVE_API ColumnVector xrownorms (const ComplexMatrix&, double p = 2);
76 
77 extern OCTAVE_API FloatRowVector xcolnorms (const FloatMatrix&, float p = 2);
78 extern OCTAVE_API FloatColumnVector xrownorms (const FloatMatrix&, float p = 2);
79 
80 extern OCTAVE_API FloatRowVector xcolnorms (const FloatComplexMatrix&, float p = 2);
81 extern OCTAVE_API FloatColumnVector xrownorms (const FloatComplexMatrix&, float p = 2);
82 
83 extern OCTAVE_API RowVector xcolnorms (const SparseMatrix&, double p = 2);
84 extern OCTAVE_API ColumnVector xrownorms (const SparseMatrix&, double p = 2);
85 
86 extern OCTAVE_API RowVector xcolnorms (const SparseComplexMatrix&, double p = 2);
87 extern OCTAVE_API ColumnVector xrownorms (const SparseComplexMatrix&, double p = 2);
88 
90 
91 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
92 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
93 inline double xnorm (const ColumnVector& v, double p = 2)
94 {
95  return octave::xnorm (v, p);
96 }
97 
98 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
99 inline double xnorm (const RowVector& v, double p = 2)
100 {
101  return octave::xnorm (v, p);
102 }
103 
104 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
105 inline double xnorm (const Matrix& m, double p = 2)
106 {
107  return octave::xnorm (m, p);
108 }
109 
110 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
111 inline double xfrobnorm (const Matrix& m)
112 {
113  return octave::xfrobnorm (m);
114 }
115 
116 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
117 inline double xnorm (const ComplexColumnVector& v, double p = 2)
118 {
119  return octave::xnorm (v, p);
120 }
121 
122 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
123 inline double xnorm (const ComplexRowVector& v, double p = 2)
124 {
125  return octave::xnorm (v, p);
126 }
127 
128 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
129 inline double xnorm (const ComplexMatrix& m, double p = 2)
130 {
131  return octave::xnorm (m, p);
132 }
133 
134 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
135 inline double xfrobnorm (const ComplexMatrix& m)
136 {
137  return octave::xfrobnorm (m);
138 }
139 
140 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
141 inline float xnorm (const FloatColumnVector& v, float p = 2)
142 {
143  return octave::xnorm (v, p);
144 }
145 
146 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
147 inline float xnorm (const FloatRowVector& v, float p = 2)
148 {
149  return octave::xnorm (v, p);
150 }
151 
152 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
153 inline float xnorm (const FloatMatrix& m, float p = 2)
154 {
155  return octave::xnorm (m, p);
156 }
157 
158 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
159 inline float xfrobnorm (const FloatMatrix& m)
160 {
161  return octave::xfrobnorm (m);
162 }
163 
164 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
165 inline float xnorm (const FloatComplexColumnVector& v, float p = 2)
166 {
167  return octave::xnorm (v, p);
168 }
169 
170 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
171 inline float xnorm (const FloatComplexRowVector& v, float p = 2)
172 {
173  return octave::xnorm (v, p);
174 }
175 
176 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
177 inline float xnorm (const FloatComplexMatrix& m, float p = 2)
178 {
179  return octave::xnorm (m, p);
180 }
181 
182 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
183 inline float xfrobnorm (const FloatComplexMatrix& m)
184 {
185  return octave::xfrobnorm (m);
186 }
187 
188 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
189 inline double xnorm (const SparseMatrix& m, double p = 2)
190 {
191  return octave::xnorm (m, p);
192 }
193 
194 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
195 inline double xfrobnorm (const SparseMatrix& m)
196 {
197  return octave::xfrobnorm (m);
198 }
199 
200 OCTAVE_DEPRECATED (7, "use 'octave::xnorm' instead")
201 inline double xnorm (const SparseComplexMatrix& m, double p = 2)
202 {
203  return octave::xnorm (m, p);
204 }
205 
206 OCTAVE_DEPRECATED (7, "use 'octave::xfrobnorm' instead")
207 inline double xfrobnorm (const SparseComplexMatrix& m)
208 {
209  return octave::xfrobnorm (m);
210 }
211 
212 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
213 inline RowVector xcolnorms (const Matrix& m, double p = 2)
214 {
215  return octave::xcolnorms (m, p);
216 }
217 
218 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
219 inline ColumnVector xrownorms (const Matrix& m, double p = 2)
220 {
221  return octave::xrownorms (m, p);
222 }
223 
224 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
225 inline RowVector xcolnorms (const ComplexMatrix& m, double p = 2)
226 {
227  return octave::xcolnorms (m, p);
228 }
229 
230 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
231 inline ColumnVector xrownorms (const ComplexMatrix& m, double p = 2)
232 {
233  return octave::xrownorms (m, p);
234 }
235 
236 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
237 inline FloatRowVector xcolnorms (const FloatMatrix& m, float p = 2)
238 {
239  return octave::xcolnorms (m, p);
240 }
241 
242 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
243 inline FloatColumnVector xrownorms (const FloatMatrix& m, float p = 2)
244 {
245  return octave::xrownorms (m, p);
246 }
247 
248 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
249 inline FloatRowVector xcolnorms (const FloatComplexMatrix& m, float p = 2)
250 {
251  return octave::xcolnorms (m, p);
252 }
253 
254 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
255 inline FloatColumnVector xrownorms (const FloatComplexMatrix& m, float p = 2)
256 {
257  return octave::xrownorms (m, p);
258 }
259 
260 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
261 inline RowVector xcolnorms (const SparseMatrix& m, double p = 2)
262 {
263  return octave::xcolnorms (m, p);
264 }
265 
266 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
267 inline ColumnVector xrownorms (const SparseMatrix& m, double p = 2)
268 {
269  return octave::xrownorms (m, p);
270 }
271 
272 OCTAVE_DEPRECATED (7, "use 'octave::xcolnorms' instead")
273 inline RowVector xcolnorms (const SparseComplexMatrix& m, double p = 2)
274 {
275  return octave::xcolnorms (m, p);
276 }
277 
278 OCTAVE_DEPRECATED (7, "use 'octave::xrownorms' instead")
279 inline ColumnVector xrownorms (const SparseComplexMatrix& m, double p = 2)
280 {
281  return octave::xrownorms (m, p);
282 }
283 #endif
284 
285 #endif
OCTAVE_END_NAMESPACE(octave)
Definition: dMatrix.h:42
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition: main.in.cc:55
T octave_idx_type m
Definition: mx-inlines.cc:773
OCTAVE_API ColumnVector xrownorms(const Matrix &, double p=2)
Definition: oct-norm.cc:628
OCTAVE_API double xfrobnorm(const Matrix &)
Definition: oct-norm.cc:585
OCTAVE_API RowVector xcolnorms(const Matrix &, double p=2)
Definition: oct-norm.cc:628
OCTAVE_API double xnorm(const ColumnVector &, double p=2)
Definition: oct-norm.cc:585