#include #include #include int main () { using namespace boost::numeric::ublas; using namespace std; banded_matrix m(3, 3, 1, 1),tm; 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) m (i, j) = 3 * i + j; std::cout << m << std::endl; tm = banded_matrix(3,3,1,1); tm = trans(m); cout << "\ntm = \n" << tm << endl; return 0; }