// ********** DO NOT REMOVE THIS BANNER ********** // ORIG-DATE: 29 fev 2000 // -*- Mode : c++ -*- // // SUMMARY : array modelisation // USAGE : LGPL // ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE // AUTHOR : Frederic Hecht // E-MAIL : frederic.hecht@ann.jussieu.fr // /* Freefem++ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Freefem++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Freefem++; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // #ifndef RNM_OP_HPP_ //NO: multiple call // #define RNM_OP_HPP_ template KNM_ & KNM_::operator oper (const outProduct_KN_ & u) { // *this oper A* t B K_throwassert (shapei.SameShape(u.a) && shapej.SameShape(u.b) ); long n= N(), m= M(); R * ai(u.a),cc, c= u.c; long stepi=u.a.step; R * bj, *bb(u.b); long stepj=u.b.step; KN_ li((*this)(0,'.')); // first line int stepij= li.step; for (long i=0;i KNM_ & KNM_::operator oper (const ConjKNM_ & u) { K_throwassert( N() == u.N() && M() == u.M() ); if (this->v != u.t().v) for(int i=0;i::operator () (i,j) oper RNM::conj( u(i,j)); else { KNM v(u); for(int i=0;i::operator () (i,j) oper RNM::conj( v(i,j)); } return *this; } template template KN_& KN_::operator oper (const F_KN_ & u) { K_throwassert ( u.check(this->N()) ); R * l(v); // first line for (long i=0;i KN_& KN_::operator oper (const SetArray & u) { R * l(v); // first line for (long i=0;i KN_& KN_::operator oper (const Mul_KNM_KN_ & u) { K_throwassert (SameShape(u.A.shapei) && !constant()); R * l(v); KN_ li(u.A(0,'.')); // first line for (long i=0;i KN_& KN_::operator oper (const Mul_KNMh_KN_ & u) { K_throwassert (SameShape(u.A.shapej) && !constant()); R * l(v); KN_ lj(u.A('.',0)); // first line for (long i=0;i KN_& KN_::operator oper (const DotStar_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step),stepb(u.b.step); R * l(v); const_R *aa(u.a), *bb(u.b); for (long i=0;i KN_& KN_::operator oper (const DotSlash_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step),stepb(u.b.step); R * l(v); const_R *aa(u.a), *bb(u.b); for (long i=0;i KN_& KN_::operator oper (const Add_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step),stepb(u.b.step); R * l(v); const_R *aa(u.a), *bb(u.b); for (long i=0;i KN_& KN_::operator oper (const Sub_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step),stepb(u.b.step); R * l(v); const_R *aa(u.a), *bb(u.b); for (long i=0;i KN_& KN_::operator oper (const Mulc_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step); R * l(v); const_R *aa(u.a),bb(u.b) ; for (long i=0;i KN_& KN_::operator oper (const Divc_KN_ & u) { K_throwassert(u.a.N() == N() ); long stepa(u.a.step); R * l(v); const_R *aa(u.a),bb(u.b) ; for (long i=0;i KN_& KN_::operator oper (const Add_Mulc_KN_ & u) { K_throwassert(u.a.N() == N() ); const long stepa(u.a.step),stepb(u.b.step); const R ca(u.ca),cb(u.cb); R * l(v); const R *aa(u.a),*bb(u.b); for (long i=0;i KN_& KN_::operator oper (const if_arth_KN_ & u) { K_throwassert(u.a.N() == N() ); R zero=R(); const long stepa(u.a.step),stepb(u.b.step),stepc(u.c.step); R * l(v); const R *aa(u.a),*bb(u.b),*cc(u.c); for (long i=0;i