From c313cbbd99fde02fa3c7145f657282d13dc1ea1d Mon Sep 17 00:00:00 2001 From: Amaury Johnan <amjohnen@gmail.com> Date: Fri, 9 Sep 2011 09:00:51 +0000 Subject: [PATCH] fix bug --- Numeric/fullMatrix.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h index 63585238b5..76110a308b 100644 --- a/Numeric/fullMatrix.h +++ b/Numeric/fullMatrix.h @@ -80,7 +80,6 @@ class fullVector _r = r; _data = original._data + r_start; } - #ifndef SWIG // NO FRIEND CLASS SUPPORT FOR SWIG !! FIX IT void setAsProxy(const fullMatrix<scalar> &original, int c) { if(_own_data && _data) delete [] _data; @@ -88,7 +87,6 @@ class fullVector _r = original._r; _data = original._data + c * _r; } - #endif // SWIG inline void scale(const scalar s) { if(s == 0.) @@ -152,6 +150,7 @@ class fullMatrix bool _own_data; // should data be freed on delete ? int _r, _c; // size of the matrix scalar *_data; // pointer on the first element + friend class fullVector<scalar>; public: // constructor and destructor @@ -219,7 +218,7 @@ class fullMatrix scalar n = 0.; for(int i = 0; i < _r; ++i) for(int j = 0; j < _c; ++j) - n += (*this)(i, j) * (*this)(i, j); + n += (*this)(i, j) * (*this)(i, j); return sqrt(n); } bool resize(int r, int c, bool resetValue = true) // data will be owned (same as constructor) -- GitLab