|
Boost Users : |
From: jhr.walter_at_[hidden]
Date: 2003-06-24 16:52:59
Hi Alexey,
you wrote:
[snip]
> > Which compiler are you using?
>
> VC++ 7.1
Sorry, I should have concluded that from one of your earlier postings.
> > > Do somebody help my to write this code correctly? Or fix library?
> >
> > How?
>
> 1. Add "typedef self_type matrix_type;" in definition of class matrix
I'm unsure about this one: matrix_type currently describes the type of a
referenced matrix for matrix proxies. What should the new definition be?
> 2. Add
> template<class M>
> BOOST_UBLAS_INLINE
> matrix_range<M> project (matrix_range<M> &data, const range &r1, const
> range &r2) {
> return data.project (r1, r2);
> }
> in matix_proxy.hpp (ver. 1.12) on line 3585.
Added that one (the omission is probably a bug).
> It may be need to add the
> same code for other proxy types .
And these.
> After those changes my code shown above compiles correctly and even runs.
;)
My current iteration is:
----------
#include <boost/numeric/ublas/matrix.hpp>
using namespace boost::numeric::ublas;
typedef matrix<double> Matrix;
typedef matrix_range<matrix<double> > MatrixRange;
void ProcessRecursive(MatrixRange& m)
{
MatrixRange mr = project(m, range(0,m.size1()/2), range(0,m.size2()/2));
if (mr.size1() > 0 && mr.size2() > 0)
ProcessRecursive(mr);
}
void StartProcess()
{
Matrix m;
MatrixRange mr(m, range::all(), range::all());
ProcessRecursive(mr);
}
int main()
{
StartProcess();
}
----------
Is something like that OK for you?
Thanks for your feedback,
Joerg
P.S.: I've uploaded my local copy to
http://groups.yahoo.com/group/ublas-dev/files/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net