GNU Octave
7.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-2022 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
43
namespace
octave
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
}
89
90
#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
91
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
92
inline
double
xnorm
(const
ColumnVector
& v,
double
p = 2)
93
{
94
return
octave::xnorm
(v, p);
95
}
96
97
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
98
inline
double
xnorm
(const
RowVector
& v,
double
p = 2)
99
{
100
return
octave::xnorm
(v, p);
101
}
102
103
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
104
inline
double
xnorm
(const
Matrix
& m,
double
p = 2)
105
{
106
return
octave::xnorm
(m, p);
107
}
108
109
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
110
inline
double
xfrobnorm
(const
Matrix
& m)
111
{
112
return
octave::xfrobnorm
(m);
113
}
114
115
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
116
inline
double
xnorm
(const
ComplexColumnVector
& v,
double
p = 2)
117
{
118
return
octave::xnorm
(v, p);
119
}
120
121
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
122
inline
double
xnorm
(const
ComplexRowVector
& v,
double
p = 2)
123
{
124
return
octave::xnorm
(v, p);
125
}
126
127
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
128
inline
double
xnorm
(const
ComplexMatrix
& m,
double
p = 2)
129
{
130
return
octave::xnorm
(m, p);
131
}
132
133
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
134
inline
double
xfrobnorm
(const
ComplexMatrix
& m)
135
{
136
return
octave::xfrobnorm
(m);
137
}
138
139
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
140
inline
float
xnorm
(const
FloatColumnVector
& v,
float
p = 2)
141
{
142
return
octave::xnorm
(v, p);
143
}
144
145
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
146
inline
float
xnorm
(const
FloatRowVector
& v,
float
p = 2)
147
{
148
return
octave::xnorm
(v, p);
149
}
150
151
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
152
inline
float
xnorm
(const
FloatMatrix
& m,
float
p = 2)
153
{
154
return
octave::xnorm
(m, p);
155
}
156
157
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
158
inline
float
xfrobnorm
(const
FloatMatrix
& m)
159
{
160
return
octave::xfrobnorm
(m);
161
}
162
163
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
164
inline
float
xnorm
(const
FloatComplexColumnVector
& v,
float
p = 2)
165
{
166
return
octave::xnorm
(v, p);
167
}
168
169
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
170
inline
float
xnorm
(const
FloatComplexRowVector
& v,
float
p = 2)
171
{
172
return
octave::xnorm
(v, p);
173
}
174
175
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
176
inline
float
xnorm
(const
FloatComplexMatrix
& m,
float
p = 2)
177
{
178
return
octave::xnorm
(m, p);
179
}
180
181
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
182
inline
float
xfrobnorm
(const
FloatComplexMatrix
& m)
183
{
184
return
octave::xfrobnorm
(m);
185
}
186
187
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
188
inline
double
xnorm
(const
SparseMatrix
& m,
double
p = 2)
189
{
190
return
octave::xnorm
(m, p);
191
}
192
193
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
194
inline
double
xfrobnorm
(const
SparseMatrix
& m)
195
{
196
return
octave::xfrobnorm
(m);
197
}
198
199
OCTAVE_DEPRECATED (7,
"use 'octave::xnorm' instead"
)
200
inline
double
xnorm
(const
SparseComplexMatrix
& m,
double
p = 2)
201
{
202
return
octave::xnorm
(m, p);
203
}
204
205
OCTAVE_DEPRECATED (7,
"use 'octave::xfrobnorm' instead"
)
206
inline
double
xfrobnorm
(const
SparseComplexMatrix
& m)
207
{
208
return
octave::xfrobnorm
(m);
209
}
210
211
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
212
inline
RowVector
xcolnorms
(const
Matrix
& m,
double
p = 2)
213
{
214
return
octave::xcolnorms
(m, p);
215
}
216
217
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
218
inline
ColumnVector
xrownorms
(const
Matrix
& m,
double
p = 2)
219
{
220
return
octave::xrownorms
(m, p);
221
}
222
223
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
224
inline
RowVector
xcolnorms
(const
ComplexMatrix
& m,
double
p = 2)
225
{
226
return
octave::xcolnorms
(m, p);
227
}
228
229
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
230
inline
ColumnVector
xrownorms
(const
ComplexMatrix
& m,
double
p = 2)
231
{
232
return
octave::xrownorms
(m, p);
233
}
234
235
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
236
inline
FloatRowVector
xcolnorms
(const
FloatMatrix
& m,
float
p = 2)
237
{
238
return
octave::xcolnorms
(m, p);
239
}
240
241
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
242
inline
FloatColumnVector
xrownorms
(const
FloatMatrix
& m,
float
p = 2)
243
{
244
return
octave::xrownorms
(m, p);
245
}
246
247
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
248
inline
FloatRowVector
xcolnorms
(const
FloatComplexMatrix
& m,
float
p = 2)
249
{
250
return
octave::xcolnorms
(m, p);
251
}
252
253
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
254
inline
FloatColumnVector
xrownorms
(const
FloatComplexMatrix
& m,
float
p = 2)
255
{
256
return
octave::xrownorms
(m, p);
257
}
258
259
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
260
inline
RowVector
xcolnorms
(const
SparseMatrix
& m,
double
p = 2)
261
{
262
return
octave::xcolnorms
(m, p);
263
}
264
265
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
266
inline
ColumnVector
xrownorms
(const
SparseMatrix
& m,
double
p = 2)
267
{
268
return
octave::xrownorms
(m, p);
269
}
270
271
OCTAVE_DEPRECATED (7,
"use 'octave::xcolnorms' instead"
)
272
inline
RowVector
xcolnorms
(const
SparseComplexMatrix
& m,
double
p = 2)
273
{
274
return
octave::xcolnorms
(m, p);
275
}
276
277
OCTAVE_DEPRECATED (7,
"use 'octave::xrownorms' instead"
)
278
inline
ColumnVector
xrownorms
(const
SparseComplexMatrix
& m,
double
p = 2)
279
{
280
return
octave::xrownorms
(m, p);
281
}
282
#endif
283
284
#endif
ColumnVector
Definition:
dColVector.h:37
ComplexColumnVector
Definition:
CColVector.h:37
ComplexMatrix
Definition:
CMatrix.h:43
ComplexRowVector
Definition:
CRowVector.h:38
FloatColumnVector
Definition:
fColVector.h:37
FloatComplexColumnVector
Definition:
fCColVector.h:37
FloatComplexMatrix
Definition:
fCMatrix.h:43
FloatComplexRowVector
Definition:
fCRowVector.h:38
FloatMatrix
Definition:
fMatrix.h:42
FloatRowVector
Definition:
fRowVector.h:37
Matrix
Definition:
dMatrix.h:42
RowVector
Definition:
dRowVector.h:37
SparseComplexMatrix
Definition:
CSparse.h:47
SparseMatrix
Definition:
dSparse.h:45
dColVector.h
dRowVector.h
fColVector.h
fRowVector.h
OCTAVE_API
#define OCTAVE_API
Definition:
main.in.cc:55
mx-fwd.h
octave
Definition:
idx-vector.cc:46
octave::xfrobnorm
double xfrobnorm(const Matrix &x)
Definition:
oct-norm.cc:585
octave::xrownorms
ColumnVector xrownorms(const Matrix &m, double p)
Definition:
oct-norm.cc:628
octave::xcolnorms
RowVector xcolnorms(const Matrix &m, double p)
Definition:
oct-norm.cc:628
octave::xnorm
double xnorm(const ColumnVector &x, double p)
Definition:
oct-norm.cc:585
oct-cmplx.h
liboctave
numeric
oct-norm.h
Generated on Sun Jun 26 2022 01:28:01 for GNU Octave by
1.9.4