diff liboctave/MArray-f.cc @ 8303:b11c31849b44

improve norm computation capabilities
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 31 Oct 2008 08:05:32 +0100
parents 82be108cc558
children c374691576f6
line wrap: on
line diff
--- a/liboctave/MArray-f.cc	Sun Nov 02 06:44:12 2008 +0100
+++ b/liboctave/MArray-f.cc	Fri Oct 31 08:05:32 2008 +0100
@@ -26,23 +26,16 @@
 
 // Instantiate MArrays of float values.
 
-#include "f77-fcn.h"
-
-extern "C"
-{
-  F77_RET_T
-  F77_FUNC (xsnrm2, XSNRM2) (const octave_idx_type&, const float*,
-			     const octave_idx_type&, float&);
-}
-
 #include "MArray.h"
 #include "MArray.cc"
+#include "fColVector.h"
+#include "oct-norm.h"
 
 template <>
 OCTAVE_API float
 MArray<float>::norm (float p) const
 {
-  MARRAY_NORM_BODY (float, float, xsnrm2, XSNRM2, octave_Float_NaN);
+  return xnorm (FloatColumnVector (*this));
 }
 
 template class OCTAVE_API MArray<float>;