From d09b80178a791b5f760f10ddc36ac88d4119d047 Mon Sep 17 00:00:00 2001 From: jiri Date: Fri, 22 Jun 2007 14:46:03 +0000 Subject: [PATCH] *** empty log message *** --- mat.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mat.cc b/mat.cc index cd46da6..1c6fb2f 100644 --- a/mat.cc +++ b/mat.cc @@ -22,6 +22,9 @@ extern ssize_t write(int, const void *, size_t); template const NRMat NRMat::oplus(const NRMat &rhs) const { +if(nn==0 && mm == 0) return rhs; +if(rhs.nn==0 && rhs.mm== 0) return *this; + NRMat r((T)0,nn+rhs.nn,mm+rhs.mm); #ifdef oldversion @@ -44,6 +47,9 @@ return r; template const NRMat NRMat::otimes(const NRMat &rhs) const { +if(nn==0 && mm == 0) return *this; +if(rhs.nn==0 && rhs.mm== 0) return rhs; + NRMat r((T)0,nn*rhs.nn,mm*rhs.mm); int i,j,k,l;