00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #if !defined (octave_xnorm_h)
00026 #define octave_xnorm_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