|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48676 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2008-09-08 18:06:25
Author: guwi17
Date: 2008-09-08 18:06:25 EDT (Mon, 08 Sep 2008)
New Revision: 48676
URL: http://svn.boost.org/trac/boost/changeset/48676
Log:
- see #2275
- fix symmetric and hermitian matrix
Text files modified:
trunk/boost/numeric/ublas/hermitian.hpp | 16 ++++++++++++----
trunk/boost/numeric/ublas/symmetric.hpp | 8 ++++++--
2 files changed, 18 insertions(+), 6 deletions(-)
Modified: trunk/boost/numeric/ublas/hermitian.hpp
==============================================================================
--- trunk/boost/numeric/ublas/hermitian.hpp (original)
+++ trunk/boost/numeric/ublas/hermitian.hpp 2008-09-08 18:06:25 EDT (Mon, 08 Sep 2008)
@@ -498,7 +498,9 @@
BOOST_UBLAS_INLINE
iterator1 find1 (int rank, size_type i, size_type j) {
if (rank == 1)
- i = triangular_type::mutable_restrict1 (i, j);
+ i = triangular_type::mutable_restrict1 (i, j, size1(), size2());
+ if (rank == 0)
+ i = triangular_type::global_mutable_restrict1 (i, size1(), j, size2());
return iterator1 (*this, i, j);
}
BOOST_UBLAS_INLINE
@@ -508,7 +510,9 @@
BOOST_UBLAS_INLINE
iterator2 find2 (int rank, size_type i, size_type j) {
if (rank == 1)
- j = triangular_type::mutable_restrict2 (i, j);
+ j = triangular_type::mutable_restrict2 (i, j, size1(), size2());
+ if (rank == 0)
+ j = triangular_type::global_mutable_restrict2 (i, size1(), j, size2());
return iterator2 (*this, i, j);
}
@@ -1416,7 +1420,9 @@
BOOST_UBLAS_INLINE
iterator1 find1 (int rank, size_type i, size_type j) {
if (rank == 1)
- i = triangular_type::mutable_restrict1 (i, j);
+ i = triangular_type::mutable_restrict1 (i, j, size1(), size2());
+ if (rank == 0)
+ i = triangular_type::global_mutable_restrict1 (i, size1(), j, size2());
return iterator1 (*this, data ().find1 (rank, i, j));
}
BOOST_UBLAS_INLINE
@@ -1446,7 +1452,9 @@
BOOST_UBLAS_INLINE
iterator2 find2 (int rank, size_type i, size_type j) {
if (rank == 1)
- j = triangular_type::mutable_restrict2 (i, j);
+ j = triangular_type::mutable_restrict2 (i, j, size1(), size2());
+ if (rank == 0)
+ j = triangular_type::global_mutable_restrict2 (i, size1(), j, size2());
return iterator2 (*this, data ().find2 (rank, i, j));
}
Modified: trunk/boost/numeric/ublas/symmetric.hpp
==============================================================================
--- trunk/boost/numeric/ublas/symmetric.hpp (original)
+++ trunk/boost/numeric/ublas/symmetric.hpp 2008-09-08 18:06:25 EDT (Mon, 08 Sep 2008)
@@ -281,7 +281,9 @@
BOOST_UBLAS_INLINE
iterator1 find1 (int rank, size_type i, size_type j) {
if (rank == 1)
- i = triangular_type::mutable_restrict1 (i, j);
+ i = triangular_type::mutable_restrict1 (i, j, size1(), size2());
+ if (rank == 0)
+ i = triangular_type::global_mutable_restrict1 (i, size1(), j, size2());
return iterator1 (*this, i, j);
}
BOOST_UBLAS_INLINE
@@ -291,7 +293,9 @@
BOOST_UBLAS_INLINE
iterator2 find2 (int rank, size_type i, size_type j) {
if (rank == 1)
- j = triangular_type::mutable_restrict2 (i, j);
+ j = triangular_type::mutable_restrict2 (i, j, size1(), size2());
+ if (rank == 0)
+ j = triangular_type::global_mutable_restrict2 (i, size1(), j, size2());
return iterator2 (*this, i, j);
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk