*** empty log message ***

This commit is contained in:
jiri 2007-06-22 14:46:03 +00:00
parent 0a195e1213
commit d09b80178a

6
mat.cc
View File

@ -22,6 +22,9 @@ extern ssize_t write(int, const void *, size_t);
template <typename T> template <typename T>
const NRMat<T> NRMat<T>::oplus(const NRMat<T> &rhs) const const NRMat<T> NRMat<T>::oplus(const NRMat<T> &rhs) const
{ {
if(nn==0 && mm == 0) return rhs;
if(rhs.nn==0 && rhs.mm== 0) return *this;
NRMat<T> r((T)0,nn+rhs.nn,mm+rhs.mm); NRMat<T> r((T)0,nn+rhs.nn,mm+rhs.mm);
#ifdef oldversion #ifdef oldversion
@ -44,6 +47,9 @@ return r;
template <typename T> template <typename T>
const NRMat<T> NRMat<T>::otimes(const NRMat<T> &rhs) const const NRMat<T> NRMat<T>::otimes(const NRMat<T> &rhs) const
{ {
if(nn==0 && mm == 0) return *this;
if(rhs.nn==0 && rhs.mm== 0) return rhs;
NRMat<T> r((T)0,nn*rhs.nn,mm*rhs.mm); NRMat<T> r((T)0,nn*rhs.nn,mm*rhs.mm);
int i,j,k,l; int i,j,k,l;