2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-14 01:02:16 +00:00
- fix symmetric and hermitian matrix

svn path=/trunk/boost/numeric/ublas/; revision=48676
This commit is contained in:
Gunter Winkler
2008-09-08 22:06:25 +00:00
parent 2609098f4f
commit 89aaa0079b
2 changed files with 18 additions and 6 deletions

View File

@@ -498,7 +498,9 @@ namespace boost { namespace numeric { namespace ublas {
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 @@ namespace boost { namespace numeric { namespace ublas {
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 @@ namespace boost { namespace numeric { namespace ublas {
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 @@ namespace boost { namespace numeric { namespace ublas {
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));
}

View File

@@ -281,7 +281,9 @@ namespace boost { namespace numeric { namespace ublas {
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 @@ namespace boost { namespace numeric { namespace ublas {
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);
}