Boost logo

Boost :

From: rgarcia1771 (garcia_at_[hidden])
Date: 2002-01-02 23:32:17


--- In boost_at_y..., nbecker_at_f... wrote:
> After a quick look at the multi-array doc, I have a couple of
> comments/questions.
>

> 1) More doc needed (no surprise). Several times, there are
comments
> about "You can suppress this object by defining
> BOOST_MULTI_ARRAY_NO_GENERATORS before including the library
> header." What does this mean? What are the implications?

Including either of the multi_array headers (multi_array.hpp or
multi_array_ref.hpp) instantiates two objects, boost::extents and
boost::indices, that reside in an unnamed namespace under namespace
boost. If multi_array is used in multiple source files, multiple
copies of these objects may exist in an application. If this is a
concern, the library user may #define the above symbol to inhibit
their construction.

> 2) It looks like an array view is a different animal than an array.
> How can I make generic algorithms that work with either one? Is
> this desirable (I think it is)?

The array views and subarrays provide a similar interface to the
multi_array and multi_array_ref. I defined the concepts "Mutable
Multi-Array" and "Const Multi-Array" to specify the generic interface
to multi-dimensional array types. I did not want view or subarray
implementation details to appear in the user or reference
documentation where they were irrelevant to the PI. I may have
abridged my discussion of views and subarrays too much as a result.

Cheers,

ron


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