
To construct an array with a non-0 base, both the docs and the examples show the use: typedef typename boost::multi_array<flt_t,1> array1_t; typedef typename array1_t::extent_range range1_t; multi_array<flt_t,1> x (extents[range1_t (1, 10)]); But this style is redundant if you have a number of array types (e.g, various number of dimensions), because you would need a range_t for each array type. But, there range_t aren't really different types. After some searching I found boost::multi_array_types::extent_range was just what I needed. I don't think this appears in the docs or examples. I suggest that this is the preferred approach, not the one shown above (and in the multi_array docs and examples).

Hi Neal, Thanks for pointing this out. I will make the changes you recommend to the documentation. Cheers, ron On Dec 18, 2006, at 2:43 PM, Neal Becker wrote:
After some searching I found boost::multi_array_types::extent_range was just what I needed. I don't think this appears in the docs or examples. I suggest that this is the preferred approach, not the one shown above (and in the multi_array docs and examples).
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/ listinfo.cgi/boost
participants (2)
-
Neal Becker
-
Ronald Garcia