svn path=/trunk/boost/libs/numeric/ublas/; revision=29717
This commit is contained in:
Michael Stevens 2005-06-21 06:11:45 +00:00
parent afa6000726
commit e1ae7eccd4
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ int main () {
matrix<double> m (3, 3);
banded_adaptor<matrix<double> > ba (m, 1, 1);
for (signed i = 0; i < signed (ba.size1 ()); ++ i)
for (signed j = (std::max) (i - 1, 0); j < (std::min) (i + 2, signed (ba.size2 ())); ++ j)
for (signed j = (std::max) (i - 1, 0); j < (std::min) (i + 2, signed (ba.size2 ())); ++ j)
ba (i, j) = 3 * i + j;
std::cout << ba << std::endl;
}

View File

@ -21,7 +21,7 @@ int main () {
using namespace boost::numeric::ublas;
banded_matrix<double> m (3, 3, 1, 1);
for (signed i = 0; i < signed (m.size1 ()); ++ i)
for (signed j = (std::max) (i - 1, 0); j < (std::min) (i + 2, signed (m.size2 ())); ++ j)
for (signed j = (std::max) (i - 1, 0); j < (std::min) (i + 2, signed (m.size2 ())); ++ j)
m (i, j) = 3 * i + j;
std::cout << m << std::endl;
}