From 30b5975c152950971367af3516488f14455d8a44 Mon Sep 17 00:00:00 2001 From: jiri Date: Wed, 13 Sep 2006 21:29:28 +0000 Subject: [PATCH] *** empty log message *** --- mat.cc | 9 +++++---- mat.h | 4 ++-- matexp.h | 1 - vec.cc | 3 +++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mat.cc b/mat.cc index eacf3dc..1624eba 100644 --- a/mat.cc +++ b/mat.cc @@ -18,19 +18,20 @@ extern ssize_t write(int, const void *, size_t); //row of template -const NRVec NRMat::row(const int i) const +const NRVec NRMat::row(const int i, int l) const { #ifdef DEBUG if(i<0||i>=nn) laerror("illegal index in row()"); #endif -NRVec r(mm); +if(l < 0) l=mm; +NRVec r(l); LA_traits::copy(&r[0], #ifdef MATPTR v[i] #else - v+i*mm + v+i*l #endif -,mm); +,l); return r; } diff --git a/mat.h b/mat.h index 897e2a2..93209c0 100644 --- a/mat.h +++ b/mat.h @@ -70,8 +70,8 @@ public: const NRVec operator*(const NRVec &rhs) const {NRVec result(nn); result.gemv((T)0,*this,'n',(T)1,rhs); return result;}; // Mat * Vec const NRVec rsum() const; //sum of rows const NRVec csum() const; //sum of columns - const NRVec row(const int i) const; //row of, efficient - const NRVec column(const int j) const {NRVec r(nn); for(int i=0; i row(const int i, int l= -1) const; //row of, efficient + const NRVec column(const int j, int l= -1) const {if(l<0) l=nn; NRVec r(l); for(int i=0; i &, const bool divide=0, bool cache=false) const; //get diagonal void gemv(const T beta, NRVec &r, const char trans, const T alpha, const NRVec &x) const {r.gemv(beta,*this,trans,alpha,x);}; inline T* operator[](const int i); //subscripting: pointer to row i diff --git a/matexp.h b/matexp.h index f5f28ad..e42d50d 100644 --- a/matexp.h +++ b/matexp.h @@ -258,7 +258,6 @@ if(mat.nrows()!=mat.ncols()||(unsigned int) mat.nrows() != (unsigned int)rhs.siz int power; //prepare the polynom of and effectively scale the matrix NRVec::elementtype> taylor2=exp_aux::elementtype>(mat,power,maxpower,maxtaylor); -cerr <<"test power "< > & NRVec< complex >::normalize() //stubs for linkage template<> +NRVec & NRVec::normalize() {laerror("normalize() impossible for integer types"); return *this;} +template<> NRVec & NRVec::normalize() {laerror("normalize() impossible for integer types"); return *this;} template<> NRVec & NRVec::normalize() {laerror("normalize() impossible for integer types"); return *this;} @@ -535,6 +537,7 @@ else return memqsort<0,NRVec,int,int>(*this,perm,from,to); template class NRVec; template class NRVec >; template class NRVec; +template class NRVec; template class NRVec; template class NRVec; template class NRVec;