diff --git a/doc/bounded_array.htm b/doc/bounded_array.htm index 779b1b80..0dd3283f 100644 --- a/doc/bounded_array.htm +++ b/doc/bounded_array.htm @@ -9,11 +9,11 @@

Bounded Array Storage

-

Bounded Array<T,N,Alloc>

+

Bounded Array

Description

-

The templated class bounded_array<T, N, ALLOC> implements a bounded storage array. The bounded array is similar to a C++ array type in that its maximum size is bounded by N and is allocated on the stack instead of the heap. Similarly a bounded_array requires no secondary storage and ALLOC is only used to specifysize_type and difference_type. +

The templated class bounded_array<T, N, ALLOC> implements a bounded storage array. The bounded array is similar to a C++ array type in that its maximum size is bounded by N and is allocated on the stack instead of the heap. Similarly a bounded_array requires no secondary storage and ALLOC is only used to specify size_type and difference_type.

-

When resized bounded_array uses the same storage with the same bound!. It is therefore efficient to resize a bounded_array

+

When resized bounded_array never reallocated the storage. It is therefore always efficient to resize a bounded_array but the size bound N must not be exceeded.

Example

 #include <boost/numeric/ublas/storage.hpp>
@@ -55,22 +55,19 @@ int main () {
 
 
 

Model of

-

Random Access Container.

+

Storage

Type requirements

-

None, except for those imposed by the requirements of Random Access Container.

+

None, except for those imposed by the requirements of Storage.

Public base classes

None.

Members

-Editor's notes: @@ -82,33 +79,30 @@ member inside this model of the concept. Description value_typeContainer -pointerContainerCurrently defined as value_type* -const_pointerCurrently defined as value_type* -referenceContainerCurrently defined as value_type& -const_referenceContainerCurrently defined as const value_type& -size_typeContainerCurrently defined as Alloc::size_type -difference_typeContainerCurrently defined as Alloc::difference_type -iteratorContainerCurrently defined as pointer -const_iteratorContainerCurrently defined as const_pointer -revere_iteratorContainerCurrently defined as std::reverse_iterator<iterator> -const_revere_iteratorContainerCurrently defined as std::reverse_iterator<const_iterator> +pointerContainerDefined as value_type* +const_pointerContainerDefined as const value_type* +referenceContainerDefined as value_type& +const_referenceContainerDefined as const value_type& +size_typeContainerDefined as Alloc::size_type +difference_typeContainerDefined as Alloc::difference_type +iteratorContainerDefined as pointer +const_iteratorContainerDefined as const_pointer +revere_iteratorContainerDefined as std::reverse_iterator<iterator> +const_revere_iteratorContainerDefined as std::reverse_iterator<const_iterator> bounded_array () -Creates a bounded_array that holds at most ZERO elements. +Storage +Creates an unbounded_array that holds zero elements. -explicit bounded_array (size_type size, const T& = init) -Storage -Creates an initialized bounded_array that holds at most size elements. All the elements are constructed from the init value. - bounded_array (size_type size) -Storage -Creates an uninitialized bounded_array that holds at most size elements. All the elements are default constructed. +Storage +Creates a uninitialized bounded_array that holds size elements. All the elements are default constructed. -bounded_array (size_type size, const T& init) -Storage -Creates an bounded_array that holds at most size elements. All the elements are copy-constructed from init. +bounded_array (size_type size, const T& init) +Storage +Creates an initialized bounded_array that holds size elements. All the elements are constructed from the init value. bounded_array (const bounded_array &c) @@ -123,12 +117,12 @@ member inside this model of the concept. void resize (size_type size) Storage -Reallocates a bounded_array to hold at most size elements. +Reallocates a bounded_array to hold size elements. -void resize (size_type size, const T& t) +void resize (size_type size, const T& t) Storage -Reallocates a bounded_array to hold at most size elements. +Reallocates a bounded_array to hold size elements. size_type size () const diff --git a/doc/unbounded_array.htm b/doc/unbounded_array.htm index a24f4ad1..5b2b87be 100644 --- a/doc/unbounded_array.htm +++ b/doc/unbounded_array.htm @@ -9,7 +9,7 @@

Unbounded Array Storage

-

Unbounded Array<T,Alloc>

+

Unbounded Array

Description

The templated class unbounded_array<T, ALLOC> implements a unbounded storage array using an allocator. The unbounded array is similar to a std::vector in that in can grow in size beyond any fixed bound. @@ -54,21 +54,17 @@ int main () {

Model of

Storage

Type requirements

-

None, except for those imposed by the requirements of Random -Access Container.

+

None, except for those imposed by the requirements of Storage.

Public base classes

None.

Members

-Editor's notes: @@ -80,31 +76,31 @@ member inside this model of the concept. Description value_typeContainer -pointerContainerCurrently defined as value_type* -const_pointerCurrently defined as value_type* -referenceContainerCurrently defined as value_type& -const_referenceContainerCurrently defined as const value_type& -size_typeContainerCurrently defined as Alloc::size_type -difference_typeContainerCurrently defined as Alloc::difference_type -iteratorContainerCurrently defined as pointer -const_iteratorContainerCurrently defined as const_pointer -revere_iteratorContainerCurrently defined as std::reverse_iterator<iterator> -const_revere_iteratorContainerCurrently defined as std::reverse_iterator<const_iterator> -allocator_typeDefined as ALLOC +pointerContainerDefined as value_type* +const_pointerContainerDefined as const value_type* +referenceContainerDefined as value_type& +const_referenceContainerDefined as const value_type& +size_typeContainerDefined as Alloc::size_type +difference_typeContainerDefined as Alloc::difference_type +iteratorContainerDefined as pointer +const_iteratorContainerDefined as const_pointer +revere_iteratorContainerDefined as std::reverse_iterator<iterator> +const_revere_iteratorContainerDefined as std::reverse_iterator<const_iterator> +allocator_typeDefined as ALLOC explicit unbounded_array (ALLOC &a = ALLOC()) Storage -Creates an unbounded_array that holds at most zero elements, using a specified allocator. +Creates an unbounded_array that holds zero elements, using a specified allocator. explicit unbounded_array (size_type size, ALLOC &a = ALLOC()) Storage -Creates a uninitialized unbounded_array that holds at most size elements, using a specified allocator. All the elements are constructed without an initializer. +Creates a uninitialized unbounded_array that holds size elements, using a specified allocator. All the elements are default constructed. -explicit unbounded_array (size_type size, const T& init, ALLOC& a = ALLOC()) +unbounded_array (size_type size, const T& init, ALLOC& a = ALLOC()) Storage -Creates an initialized unbounded_array that holds at most size elements, using a specified allocator. All the elements are constructed from the init value. +Creates an initialized unbounded_array that holds size elements, using a specified allocator. All the elements are constructed from the init value. unbounded_array (const unbounded_array &a) @@ -117,14 +113,14 @@ member inside this model of the concept. Deallocates the unbounded_array itself. -void resize (size_type n , bool preserve = true) +void resize (size_type n) Storage -Reallocates an unbounded_array to hold at most n elements. When preserve == false the elements values after resize are undefined. +Reallocates an unbounded_array to hold n elements. Values are uninitialised. -void resize(size_type n, const T& t) +void resize(size_type n, const T& t) Storage -Reallocates an unbounded_array to hold at most n elements. +Reallocates an unbounded_array to hold n elements. Values are copies of t size_type size () const