[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN/internal matrix.hh
From: |
Tom Drummond |
Subject: |
[Toon-members] TooN/internal matrix.hh |
Date: |
Wed, 08 Apr 2009 04:14:39 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Tom Drummond <twd20> 09/04/08 04:14:39
Modified files:
internal : matrix.hh
Log message:
fixed embarrassing loop limit bug in many functions
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/matrix.hh?cvsroot=toon&r1=1.23&r2=1.24
Patches:
Index: matrix.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/matrix.hh,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- matrix.hh 3 Apr 2009 10:02:29 -0000 1.23
+++ matrix.hh 8 Apr 2009 04:14:39 -0000 1.24
@@ -91,7 +91,7 @@
SizeMismatch<Cols, Cols2>::test(num_cols(), from.num_cols());
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] = from[r][c];
return *this;
@@ -100,7 +100,7 @@
Matrix& operator+=(const Precision& rhs)
{
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] += rhs;
return *this;
@@ -109,7 +109,7 @@
Matrix& operator-=(const Precision& rhs)
{
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] -= rhs;
return *this;
@@ -118,7 +118,7 @@
Matrix& operator*=(const Precision& rhs)
{
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] *= rhs;
return *this;
@@ -127,7 +127,7 @@
Matrix& operator/=(const Precision& rhs)
{
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] /= rhs;
return *this;
@@ -140,7 +140,7 @@
SizeMismatch<Cols, Cols2>::test(num_cols(), from.num_cols());
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] += from[r][c];
return *this;
@@ -153,7 +153,7 @@
SizeMismatch<Cols, Cols2>::test(num_cols(), from.num_cols());
for(int r=0; r < num_rows(); r++)
- for(int c=0; c < num_rows(); c++)
+ for(int c=0; c < num_cols(); c++)
(*this)[r][c] -= from[r][c];
return *this;