|
Ublas : |
Subject: Re: [ublas] [Question] sub-matrix by columns
From: Marcel Rehberg (Marcel.Rehberg_at_[hidden])
Date: 2010-11-24 09:59:31
Hi,
On Wed, 24 Nov 2010 15:39:57 +0100, Matwey V. Kornilov
<matwey.kornilov_at_[hidden]> wrote:
>
> Hi Marcel,
>
> What version of gcc do you use?
gcc (Debian 4.3.2-1.1) 4.3.2
And as far as I understand the documentation I need to matrices for
indexing, one for the rows and one for the columns. So my minimum example
to extract the first column of a 2xN matrix (named grid here) would be:
ublas::matrix<unsigned> index1(2,1);
ublas::matrix<unsigned> index2(2,1);
index1(0,0) = 0;
index1(1,0) = 1;
index2(0,0) = 0;
index2(1,0) = 0;
ublas::matrix_indirect<ublas::matrix<double, ublas::column_major>,
ublas::matrix<unsigned> > test(grid, index1, index2);
Maybe there is an error already here.
thanks, Marcel
>
> Marcel Rehberg wrote:
>
>> btw: Regarding the error for the matrix_indirect: For indexing I tried
>> to
>> use ublas::matrix<unsigned> but that got me several
>>
>> boost_1_44_0/boost/numeric/ublas/matrix_proxy.hpp:4381: error: no type
>> named ?const_iterator? in ?class boost::numeric::ublas::matrix<unsigned
>> int, boost::numeric::ublas::basic_row_major<unsigned int, int>,
>> boost::numeric::ublas::unbounded_array<unsigned int,
>> std::allocator<unsigned int> > >?
>>
>> and
>>
>> boost/numeric/ublas/matrix_proxy.hpp:4220: error: ?const class
>> boost::numeric::ublas::matrix<unsigned int,
>> boost::numeric::ublas::basic_row_major<unsigned int, int>,
>> boost::numeric::ublas::unbounded_array<unsigned int,
>> std::allocator<unsigned int> > >? has no member named ?preprocess?
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Marcel.Rehberg_at_[hidden]