Boost logo

Boost :

From: Stas Fomin (stas_at_[hidden])
Date: 2002-11-30 12:57:25

 I have to make matrix resize with preserving of the content of the matrix.
 (add rows, columns...)

I try to do this using matrix ranges:

  Mat A(2,2);

  Mat _A(4,4);
  _A.project(ublas::range(0,A.size1()), ublas::range(0,A.size2())).assign(A);
/* or ublas::project(_A, ublas::range(0,A.size1()),
ublas::range(0,A.size2()))).assign(A); */
  std::cout << A << std::endl; /* Zero matrix shown :( */

1. Why this do not work? (see examples from
2. How to do "preserving matrix resize" efficiently?

                Thanks all in advance,
                                        Stas Fomin.

Boost list run by bdawes at, gregod at, cpdaniel at, john at