Boost C++ Libraries: Ticket #6353: memory layout specifiers doc clarification https://svn.boost.org/trac10/ticket/6353 <p> <a href="http://www.boost.org/doc/libs/1_48_0/libs/multi_array/doc/reference.html#memory_layout">http://www.boost.org/doc/libs/1_48_0/libs/multi_array/doc/reference.html#memory_layout</a> </p> <p> Contains an ambiguous specification of storage ordering. This lead me to making the wrong assumption about the meaning as shown by the following post: </p> <p> <a class="ext-link" href="http://article.gmane.org/gmane.comp.lib.boost.user/72160"><span class="icon">​</span>http://article.gmane.org/gmane.comp.lib.boost.user/72160</a> </p> <p> As indicated in that post, *if* I had read the page: </p> <p> <a href="http://www.boost.org/doc/libs/1_48_0/libs/multi_array/doc/user.html#sec_storage">http://www.boost.org/doc/libs/1_48_0/libs/multi_array/doc/user.html#sec_storage</a> </p> <p> the meaning or storage ordering would have been clear; however, I thought reading the reference.html#memory_layout page would have been the most unambiguous doc since it is the reference manual. </p> <p> I think the following snippet of code, or something similar, on the reference.html#memory_layout would make the meaning clearer: </p> <pre class="wiki"> std::vector&lt;unsigned&gt; strides_expected ( std::vector&lt;unsigned&gt; const&amp; a_permut //storage order(a permutaion 0..a_lengths.size()-1) , std::vector&lt;unsigned&gt; const&amp; a_lengths //length of axes. ) { unsigned const n=a_lengths.size(); std::vector&lt;unsigned&gt; strides(n); strides[permut_i[0]]=1; for( unsigned i=1; i&lt;n; ++i) { unsigned i_prev=permut_i[i-1]; strides[permut_i[i]]=strides[i_prev]*a_lengths[i_prev]; } return strides;//strides of the axes } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6353 Trac 1.4.3