GNU Octave  4.4.1
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-2018 VZLU Prague, a.s.
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 // author: Jaroslav Hajek <highegg@gmail.com>
24 
25 #if ! defined (octave_oct_norm_h)
26 #define octave_oct_norm_h 1
27 
28 #include "octave-config.h"
29 
30 #include "oct-cmplx.h"
31 
32 #define DECLARE_XNORM_FUNCS(PREFIX, RTYPE) \
33  class PREFIX##Matrix; \
34  class PREFIX##ColumnVector; \
35  class PREFIX##RowVector; \
36  \
37  extern OCTAVE_API RTYPE \
38  xnorm (const PREFIX##ColumnVector&, RTYPE p = 2); \
39  extern OCTAVE_API RTYPE \
40  xnorm (const PREFIX##RowVector&, RTYPE p = 2); \
41  extern OCTAVE_API RTYPE \
42  xnorm (const PREFIX##Matrix&, RTYPE p = 2); \
43  extern OCTAVE_API RTYPE \
44  xfrobnorm (const PREFIX##Matrix&);
45 
46 DECLARE_XNORM_FUNCS(, double)
48 DECLARE_XNORM_FUNCS(Float, float)
50 
52 DECLARE_XNORM_FUNCS(SparseComplex, double)
53 
54 #define DECLARE_COLROW_NORM_FUNCS(PREFIX, RPREFIX, RTYPE) \
55  extern OCTAVE_API RPREFIX##RowVector \
56  xcolnorms (const PREFIX##Matrix&, RTYPE p = 2); \
57  extern OCTAVE_API RPREFIX##ColumnVector \
58  xrownorms (const PREFIX##Matrix&, RTYPE p = 2); \
59 
60 DECLARE_COLROW_NORM_FUNCS(, , double)
62 DECLARE_COLROW_NORM_FUNCS(Float, Float, float)
64 
66 DECLARE_COLROW_NORM_FUNCS(SparseComplex, , double)
67 
68 #endif
#define DECLARE_COLROW_NORM_FUNCS(PREFIX, RPREFIX, RTYPE)
Definition: oct-norm.h:54
#define DECLARE_XNORM_FUNCS(PREFIX, RTYPE)
Definition: oct-norm.h:32
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
std::complex< double > Complex
Definition: oct-cmplx.h:31