Boost logo

Boost :

From: Joerg Walter (jhr.walter_at_[hidden])
Date: 2002-06-29 08:29:12


----- Original Message -----
From: "Benedikt Weber" <weber_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
To: <boost_at_[hidden]>
Sent: Saturday, June 29, 2002 11:41 AM
Subject: [boost] uBLAS with valarray

> What are the containers that work with uBLAS? I could not find an explicit
> statement on this question in the documentation.

Sorry for that. numerics::vector<> and numerics::matrix<> should work with
std::vector, numerics::unbounded_array or numerics::bounded_array as
array_type. numerics::sparse_vector<> and numerics::sparse_matrix<> should
work with std::map or numerics::map_array as array_type.

valarray could be adopted in the following way:

valarray<double> va (size);
array_adaptor<double> aa (size, &va [0]);
vector<double, array_adaptor<double> > v (size, aa);

> Either a list or better a
> description of requirements would be helpful.

Yes.

> Anyway, in your tests there is
> code for valarray, so I put #define USE_STD_VALARRAY into bench1.h.
However
> that gives an error because there are no iterators defined for valarray.

Yes, this is rudiment of the times, when uBLAS didn't have iterators ;-)
Will be changed to use array_adaptor.

Regards

Joerg


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk