oct-norm.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2008-2012 VZLU Prague, a.s.
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 3 of the License, or (at your
00010 option) any later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, see
00019 <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 // author: Jaroslav Hajek <highegg@gmail.com>
00024 
00025 #if !defined (octave_norm_h)
00026 #define octave_norm_h 1
00027 
00028 #include "oct-cmplx.h"
00029 
00030 #define DECLARE_XNORM_FUNCS(PREFIX, RTYPE) \
00031   class PREFIX##Matrix; \
00032   class PREFIX##ColumnVector; \
00033   class PREFIX##RowVector; \
00034   \
00035   extern OCTAVE_API RTYPE xnorm (const PREFIX##ColumnVector&, RTYPE p = 2); \
00036   extern OCTAVE_API RTYPE xnorm (const PREFIX##RowVector&, RTYPE p = 2); \
00037   extern OCTAVE_API RTYPE xnorm (const PREFIX##Matrix&, RTYPE p = 2); \
00038   extern OCTAVE_API RTYPE xfrobnorm (const PREFIX##Matrix&);
00039 
00040 DECLARE_XNORM_FUNCS(, double)
00041 DECLARE_XNORM_FUNCS(Complex, double)
00042 DECLARE_XNORM_FUNCS(Float, float)
00043 DECLARE_XNORM_FUNCS(FloatComplex, float)
00044 
00045 DECLARE_XNORM_FUNCS(Sparse, double)
00046 DECLARE_XNORM_FUNCS(SparseComplex, double)
00047 
00048 #define DECLARE_COLROW_NORM_FUNCS(PREFIX, RPREFIX, RTYPE) \
00049   extern OCTAVE_API RPREFIX##RowVector xcolnorms (const PREFIX##Matrix&, RTYPE p = 2); \
00050   extern OCTAVE_API RPREFIX##ColumnVector xrownorms (const PREFIX##Matrix&, RTYPE p = 2); \
00051 
00052 DECLARE_COLROW_NORM_FUNCS(, , double)
00053 DECLARE_COLROW_NORM_FUNCS(Complex, , double)
00054 DECLARE_COLROW_NORM_FUNCS(Float, Float, float)
00055 DECLARE_COLROW_NORM_FUNCS(FloatComplex, Float, float)
00056 
00057 DECLARE_COLROW_NORM_FUNCS(Sparse, , double)
00058 DECLARE_COLROW_NORM_FUNCS(SparseComplex, , double)
00059 
00060 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines