Updated documentation as per Robert Ramey and Dave Abrahams' comments.

[SVN r33561]
This commit is contained in:
Ronald Garcia 2006-04-05 19:38:33 +00:00
parent 9c71529cb5
commit 9ce1adb801
5 changed files with 531 additions and 477 deletions

File diff suppressed because it is too large Load Diff

View File

@ -38,21 +38,21 @@ class const_multi_array_ref {
public:
// types:
typedef ValueType element;
typedef *implementation-defined* value_type;
typedef *implementation-defined* reference;
typedef *implementation-defined* const_reference;
typedef *implementation-defined* difference_type;
typedef *implementation-defined* iterator;
typedef *implementation-defined* const_iterator;
typedef *implementation-defined* reverse_iterator;
typedef *implementation-defined* const_reverse_iterator;
typedef *unspecified* value_type;
typedef *unspecified* reference;
typedef *unspecified* const_reference;
typedef *unspecified* difference_type;
typedef *unspecified* iterator;
typedef *unspecified* const_iterator;
typedef *unspecified* reverse_iterator;
typedef *unspecified* const_reverse_iterator;
typedef multi_array_types::size_type size_type;
typedef multi_array_types::index index;
typedef multi_array_types::index_gen index_gen;
typedef multi_array_types::index_range index_range;
typedef multi_array_types::extent_gen extent_gen;
typedef multi_array_types::extent_range extent_range;
typedef *implementation-defined* storage_order_type;
typedef *unspecified* storage_order_type;
// template typedefs
template <std::size_t Dims> struct subarray;

View File

@ -36,21 +36,21 @@ class multi_array {
public:
// types:
typedef ValueType element;
typedef *implementation-defined* value_type;
typedef *implementation-defined* reference;
typedef *implementation-defined* const_reference;
typedef *implementation-defined* difference_type;
typedef *implementation-defined* iterator;
typedef *implementation-defined* const_iterator;
typedef *implementation-defined* reverse_iterator;
typedef *implementation-defined* const_reverse_iterator;
typedef *unspecified* value_type;
typedef *unspecified* reference;
typedef *unspecified* const_reference;
typedef *unspecified* difference_type;
typedef *unspecified* iterator;
typedef *unspecified* const_iterator;
typedef *unspecified* reverse_iterator;
typedef *unspecified* const_reverse_iterator;
typedef multi_array_types::size_type size_type;
typedef multi_array_types::index index;
typedef multi_array_types::index_gen index_gen;
typedef multi_array_types::index_range index_range;
typedef multi_array_types::extent_gen extent_gen;
typedef multi_array_types::extent_range extent_range;
typedef *implementation-defined* storage_order_type;
typedef *unspecified* storage_order_type;
// template typedefs
@ -136,7 +136,9 @@ public:
template <typename SizeList>
void reshape(const SizeList& sizes)
template <typename BaseList> void reindex(const BaseList& values);
void reindex(index value);
void reindex(index value);
template <typename ExtentList>
multi_array& resize(const ExtentList& extents);
multi_array& resize(extents_tuple& extents);
};
]]>
@ -327,15 +329,20 @@ O(<literal>this->num_elements()</literal>) calls to
<varlistentry>
<term>
<programlisting><![CDATA[multi_array& resize(extent_gen::gen_type<NumDims>::type ranges);]]>
<programlisting><![CDATA[multi_array& resize(extent_gen::gen_type<NumDims>::type extents);
template <typename ExtentList>
multi_array& resize(const ExtentList& extents);
]]>
</programlisting></term>
<listitem>
<para>
This function resizes an array to the shape specified by
<literal>ranges</literal>. The contents of the array are preserved
whenever possible; if the new array size is smaller, then some data will
be lost. Any new elements created by resizing the array are initialized with
the <literal>element</literal> default constructor.
This function resizes an array to the shape specified by
<literal>extents</literal>, which is either a generated list of
extents or a model of the <literal>Collection</literal> concept. The
contents of the array are preserved whenever possible; if the new
array size is smaller, then some data will be lost. Any new elements
created by resizing the array are initialized with the
<literal>element</literal> default constructor.
</para>
</listitem>
</varlistentry>

View File

@ -37,21 +37,21 @@ class multi_array_ref {
public:
// types:
typedef ValueType element;
typedef *implementation-defined* value_type;
typedef *implementation-defined* reference;
typedef *implementation-defined* const_reference;
typedef *implementation-defined* difference_type;
typedef *implementation-defined* iterator;
typedef *implementation-defined* const_iterator;
typedef *implementation-defined* reverse_iterator;
typedef *implementation-defined* const_reverse_iterator;
typedef *unspecified* value_type;
typedef *unspecified* reference;
typedef *unspecified* const_reference;
typedef *unspecified* difference_type;
typedef *unspecified* iterator;
typedef *unspecified* const_iterator;
typedef *unspecified* reverse_iterator;
typedef *unspecified* const_reverse_iterator;
typedef multi_array_types::size_type size_type;
typedef multi_array_types::index index;
typedef multi_array_types::index_gen index_gen;
typedef multi_array_types::index_range index_range;
typedef multi_array_types::extent_gen extent_gen;
typedef multi_array_types::extent_range extent_range;
typedef *implementation-defined* storage_order_type;
typedef *unspecified* storage_order_type;
// template typedefs
template <std::size_t Dims> struct subarray;

View File

@ -50,13 +50,13 @@ brings the following declarations into scope:</para>
<![CDATA[namespace boost {
namespace multi_array_types {
typedef *implementation-defined* index;
typedef *implementation-defined* size_type;
typedef *implementation-defined* difference_type;
typedef *implementation-defined* index_range;
typedef *implementation-defined* extent_range;
typedef *implementation-defined* index_gen;
typedef *implementation-defined* extent_gen;
typedef *unspecified* index;
typedef *unspecified* size_type;
typedef *unspecified* difference_type;
typedef *unspecified* index_range;
typedef *unspecified* extent_range;
typedef *unspecified* index_gen;
typedef *unspecified* extent_gen;
}
template <typename ValueType,
@ -343,13 +343,13 @@ std::count_if(this->index_bases(),this->index_bases()+this->num_dimensions(),
<programlisting>
<![CDATA[namespace multi_array_types {
typedef *implementation-defined* index;
typedef *implementation-defined* size_type;
typedef *implementation-defined* difference_type;
typedef *implementation-defined* index_range;
typedef *implementation-defined* extent_range;
typedef *implementation-defined* index_gen;
typedef *implementation-defined* extent_gen;
typedef *unspecified* index;
typedef *unspecified* size_type;
typedef *unspecified* difference_type;
typedef *unspecified* index_range;
typedef *unspecified* extent_range;
typedef *unspecified* index_gen;
typedef *unspecified* extent_gen;
}]]>
</programlisting>