|
Boost : |
From: jhrwalter (walter_at_[hidden])
Date: 2002-03-10 09:10:05
--- In boost_at_y..., "rwgk" <rwgk_at_y...> wrote:
> --- In boost_at_y..., "jhrwalter" <walter_at_g...> wrote:
> > Sure, IMO. One possibility is to use the array template
> > argument of numerics::vector (or numerics::matrix ;-) to
> > adapt your own storage container.
>
> Thanks for the hint, this looks very interesting!
> When I first looked at the ublas documentation I mistook
> "A" for "allocator." Maybe you want to make this clearer,
> e.g.
>
> template <typename ElementType, typename ArrayType>
> class vector ...
That would be a change in our naming convention. I'm not sure about
this.
> I was looking for information about the requirements for
> "A" but could not find anything more than "The type of the
> adapted array." Did I miss the relevant documentation?
No, we did not document the storage concept until now. But you could
use the documentation of bounded_array and unbounded_array as
examples for the array_type instead.
> Unfortunately I am having trouble compiling this minimal
> example:
>
> #include <vector>
> #include <boost/numeric/ublas/config.h>
> #include <boost/numeric/ublas/vector.h>
>
> int main()
> {
> numerics::vector<float, std::vector<float> > ua(1000);
> ua = ua * ua;
> return 0;
> }
You seem to need element-wise multiplication. We currently do not
support this in ublas.
[snip]
Regards
Joerg
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk