From 1d4b1c48cc8c4b4e448d37cb233e91e6ebfd55b6 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Mon, 25 May 2015 13:45:32 +0100 Subject: [PATCH] Most cosmetic --- lib/math/Grid_math_tensors.h | 113 ++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/lib/math/Grid_math_tensors.h b/lib/math/Grid_math_tensors.h index 32ca78e5..4e6752e9 100644 --- a/lib/math/Grid_math_tensors.h +++ b/lib/math/Grid_math_tensors.h @@ -134,66 +134,65 @@ public: iVector & operator= (iVector &©me) = default; */ - iVector & operator= (const Zero &hero){ - zeroit(*this); - return *this; + iVector & operator= (const Zero &hero){ + zeroit(*this); + return *this; + } + friend strong_inline void zeroit(iVector &that){ + for(int i=0;i &that){ - for(int i=0;i &that){ + for(int i=0;i &out,const iVector &in){ + for(int i=0;i &that){ - for(int i=0;i &out,const iVector &in,int permutetype){ + for(int i=0;i &out,const iVector &in){ - for(int i=0;i operator -(const iVector &r) { + iVector ret; + for(int i=0;i &operator *=(const iScalar &r) { + *this = (*this)*r; + return *this; + } + strong_inline iVector &operator -=(const iVector &r) { + *this = (*this)-r; + return *this; + } + strong_inline iVector &operator +=(const iVector &r) { + *this = (*this)+r; + return *this; + } + strong_inline vtype & operator ()(int i) { + return _internal[i]; + } + strong_inline const vtype & operator ()(int i) const { + return _internal[i]; + } + friend std::ostream& operator<< (std::ostream& stream, const iVector &o){ + stream<< "V<"<{"; + for(int i=0;i &out,const iVector &in,int permutetype){ - for(int i=0;i operator -(const iVector &r) { - iVector ret; - for(int i=0;i &operator *=(const iScalar &r) { - *this = (*this)*r; - return *this; - } - strong_inline iVector &operator -=(const iVector &r) { - *this = (*this)-r; - return *this; - } - strong_inline iVector &operator +=(const iVector &r) { - *this = (*this)+r; - return *this; - } - strong_inline vtype & operator ()(int i) { - return _internal[i]; - } - strong_inline const vtype & operator ()(int i) const { - return _internal[i]; - } - friend std::ostream& operator<< (std::ostream& stream, const iVector &o){ - stream<< "V<"<{"; - for(int i=0;i class iMatrix @@ -213,6 +212,8 @@ public: iMatrix(const Zero &z){ *this = zero; }; iMatrix() =default; + iMatrix(scalar_type s) { (*this) = s ;};// recurse down and hit the constructor for vector_type + /* iMatrix(const iMatrix ©me)=default; iMatrix(iMatrix &©me)=default;