#include <SmallVector.h>
Collaboration diagram for PLearn::SmallVector< T, SizeBits, Allocator >:

Public Types | |
| typedef SmallVector< T, SizeBits > | self_type |
| Typedefs. | |
| typedef Allocator | alloc_type |
| typedef T | value_type |
| typedef size_t | size_type |
| typedef ptrdiff_t | difference_type |
| typedef T * | iterator |
| typedef const T * | const_iterator |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
Public Member Functions | |
| iterator | begin () |
| Iterators. | |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reference | operator[] (size_type n) |
| Unchecked element access. | |
| const_reference | operator[] (size_type n) const |
| reference | at (size_type n) |
| Checked element access. | |
| const_reference | at (size_type n) const |
| reference | front () |
| first element | |
| const_reference | front () const |
| reference | back () |
| last element | |
| const_reference | back () const |
| SmallVector () | |
| Constructors, etc. | |
| SmallVector (size_type n, const T &val=T()) | |
| ~SmallVector () | |
| SmallVector (const self_type &) | |
| self_type & | operator= (const self_type &) |
| template<class In> | SmallVector (In first, In last) |
| Construct/Copy from Input iterator. | |
| template<class In> void | assign (In first, In last) |
| void | assign (size_type n, const T &val) |
| n copies of val | |
| void | push_back (const T &x) |
| add to end | |
| void | pop_back () |
| remove last element | |
| size_type | size () const |
| number of elements | |
| bool | empty () const |
| size_type | max_size () |
| void | resize (size_type sz, const T &val=T()) |
| added elts init by val | |
| void | reserve (size_type n) |
| make room for total of n elts | |
| void | swap (SmallVector &) |
| Other functions. | |
Static Public Member Functions | |
| void | allocator (alloc_type *the_alloc) |
| Set here the allocator you want (we capture the object). | |
| alloc_type & | allocator () |
Private Attributes | |
| alloc_type::index_type | i |
| index of vector in memory | |
Static Private Attributes | |
| alloc_type * | alloc |
| underlying allocator | |
Definition at line 62 of file SmallVector.h.
|
|||||
|
Definition at line 67 of file SmallVector.h. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::allocator(). |
|
|||||
|
Definition at line 74 of file SmallVector.h. |
|
|||||
|
Definition at line 77 of file SmallVector.h. |
|
|||||
|
Definition at line 79 of file SmallVector.h. |
|
|||||
|
Definition at line 71 of file SmallVector.h. |
|
|||||
|
Definition at line 73 of file SmallVector.h. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::assign(). |
|
|||||
|
Definition at line 76 of file SmallVector.h. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::resize(). |
|
|||||
|
Definition at line 78 of file SmallVector.h. |
|
|||||
|
Typedefs.
Definition at line 66 of file SmallVector.h. |
|
|||||
|
|||||
|
Definition at line 69 of file SmallVector.h. |
|
|||||||||
|
Constructors, etc.
Definition at line 350 of file SmallVector.h. |
|
||||||||||||||||
|
Definition at line 356 of file SmallVector.h. References val. |
|
|||||||||
|
Definition at line 372 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::allocator(), and PLearn::SmallVector< T, SizeBits, Allocator >::i. |
|
||||||||||
|
Definition at line 364 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), and PLearn::SmallVector< T, SizeBits, Allocator >::end(). |
|
||||||||||||||||||||
|
Construct/Copy from Input iterator.
Definition at line 112 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::assign(). |
|
|||||||||
|
||||||||||
|
Set here the allocator you want (we capture the object).
Definition at line 153 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::alloc. |
|
||||||||||||||||
|
n copies of val
Definition at line 338 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::i, PLearn::SmallVector< T, SizeBits, Allocator >::max_size(), PLERROR, resize(), PLearn::SmallVector< T, SizeBits, Allocator >::size_type, and val. |
|
||||||||||||||||||||
|
could not define it out-of-line; bug in gcc? Definition at line 117 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::assign(), PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLearn::SmallVector< T, SizeBits, Allocator >::iterator, and resize(). Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::assign(), and PLearn::SmallVector< T, SizeBits, Allocator >::SmallVector(). |
|
||||||||||
|
n cannot be less than zero, because size_type is usually unsigned Definition at line 280 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLERROR, and PLearn::SmallVector< T, SizeBits, Allocator >::size(). |
|
||||||||||
|
Checked element access. n cannot be less than zero, because size_type is usually unsigned Definition at line 268 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLERROR, and PLearn::SmallVector< T, SizeBits, Allocator >::size(). |
|
|||||||||
|
Definition at line 325 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::empty(), PLearn::SmallVector< T, SizeBits, Allocator >::end(), and PLERROR. |
|
|||||||||
|
last element
Definition at line 314 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::empty(), PLearn::SmallVector< T, SizeBits, Allocator >::end(), and PLERROR. |
|
|||||||||
|
This is always correct, even for zero-size vectors Definition at line 216 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::allocator(), and PLearn::SmallVector< T, SizeBits, Allocator >::i. |
|
|||||||||
|
Iterators. This is always correct, even for zero-size vectors Definition at line 207 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::allocator(), and PLearn::SmallVector< T, SizeBits, Allocator >::i. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::assign(), PLearn::SmallVector< T, SizeBits, Allocator >::at(), PLearn::SmallVector< T, SizeBits, Allocator >::end(), PLearn::SmallVector< T, SizeBits, Allocator >::front(), PLearn::SmallVector< T, SizeBits, Allocator >::operator=(), PLearn::operator==(), PLearn::SmallVector< T, SizeBits, Allocator >::operator[](), and PLearn::SmallVector< T, SizeBits, Allocator >::SmallVector(). |
|
|||||||||
|
Definition at line 138 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::size(). Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::back(), and PLearn::SmallVector< T, SizeBits, Allocator >::front(). |
|
|||||||||
|
Definition at line 233 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), and PLearn::SmallVector< T, SizeBits, Allocator >::size(). |
|
|||||||||
|
|||||||||
|
Definition at line 303 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLearn::SmallVector< T, SizeBits, Allocator >::empty(), and PLERROR. |
|
|||||||||
|
first element
Definition at line 292 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLearn::SmallVector< T, SizeBits, Allocator >::empty(), and PLERROR. |
|
|||||||||
|
Definition at line 141 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::size_type. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::assign(), PLearn::SmallVector< T, SizeBits, Allocator >::reserve(), and PLearn::SmallVector< T, SizeBits, Allocator >::resize(). |
|
||||||||||
|
Definition at line 380 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLearn::SmallVector< T, SizeBits, Allocator >::end(), PLearn::SmallVector< T, SizeBits, Allocator >::size(), and PLearn::swap(). |
|
||||||||||
|
Definition at line 256 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLERROR, and PLearn::SmallVector< T, SizeBits, Allocator >::size(). |
|
||||||||||
|
Unchecked element access.
Definition at line 244 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), PLERROR, and PLearn::SmallVector< T, SizeBits, Allocator >::size(). |
|
|||||||||
|
remove last element
Definition at line 406 of file SmallVector.h. References PLERROR, resize(), PLearn::SmallVector< T, SizeBits, Allocator >::size(), and PLearn::SmallVector< T, SizeBits, Allocator >::size_type. |
|
||||||||||
|
add to end
Definition at line 397 of file SmallVector.h. References resize(), PLearn::SmallVector< T, SizeBits, Allocator >::size(), PLearn::SmallVector< T, SizeBits, Allocator >::size_type, and x. |
|
||||||||||
|
make room for total of n elts
Definition at line 457 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::max_size(), and PLERROR. |
|
||||||||||||||||
|
added elts init by val Copy old data on new data Initialize remaining of new data make new size effective Definition at line 430 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::allocator(), PLearn::SmallVector< T, SizeBits, Allocator >::i, PLearn::SmallVector< T, SizeBits, Allocator >::max_size(), PLERROR, PLearn::SmallVector< T, SizeBits, Allocator >::pointer, PLearn::SmallVector< T, SizeBits, Allocator >::size_type, and val. |
|
|||||||||
|
||||||||||
|
Other functions.
Definition at line 469 of file SmallVector.h. References PLearn::SmallVector< T, SizeBits, Allocator >::i. |
|
|||||
|
underlying allocator
Definition at line 198 of file SmallVector.h. Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::allocator(). |
|
|||||
1.3.7