#include <TinyVector.h>
Inheritance diagram for PLearn::TinyVector< T, N, TTrait >:
Public Types | |
typedef T | value_type |
Typedefs. | |
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 |
TinyVector () | |
Constructors, etc. | |
TinyVector (size_type n, const T &val=T()) | |
template<class In> | TinyVector (In first, In last) |
Use default copy constructor, destructor, assignment operator 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 (TinyVector &) |
Other functions. | |
Private Attributes | |
T | arr [N] |
Definition at line 69 of file TinyVector.h.
|
Definition at line 78 of file TinyVector.h. |
|
Definition at line 81 of file TinyVector.h. |
|
Definition at line 83 of file TinyVector.h. |
|
Definition at line 75 of file TinyVector.h. Referenced by PLearn::TinyVector< T, N, TTrait >::size(). |
|
Definition at line 77 of file TinyVector.h. |
|
Definition at line 80 of file TinyVector.h. |
|
Definition at line 82 of file TinyVector.h. |
|
|
Typedefs.
Definition at line 73 of file TinyVector.h. |
|
Constructors, etc.
Definition at line 358 of file TinyVector.h. |
|
Definition at line 365 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLearn::TinyVector< T, N, TTrait >::size_type, and val. |
|
Use default copy constructor, destructor, assignment operator Construct/Copy from Input iterator.
|
|
n copies of val
Definition at line 347 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, resize(), PLearn::TinyVector< T, N, TTrait >::size_type, and val. |
|
could not define it out-of-line; bug in gcc? Definition at line 117 of file TinyVector.h. |
|
n cannot be less than zero, because size_type is usually unsigned Definition at line 294 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, and PLearn::TinyVector< T, N, TTrait >::size(). |
|
Checked element access. n cannot be less than zero, because size_type is usually unsigned Definition at line 283 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, and PLearn::TinyVector< T, N, TTrait >::size(). |
|
Definition at line 335 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::empty(), PLearn::TinyVector< T, N, TTrait >::end(), and PLERROR. |
|
last element
Definition at line 325 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::empty(), PLearn::TinyVector< T, N, TTrait >::end(), and PLERROR. |
|
This is always correct, even for zero-size vectors Definition at line 236 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr. |
|
Iterators. This is always correct, even for zero-size vectors Definition at line 228 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr. Referenced by PLearn::operator==(). |
|
Definition at line 137 of file TinyVector.h. Referenced by PLearn::TinyVector< T, N, TTrait >::back(), PLearn::TTensor< T >::DEPRECATEDsubTensor(), PLearn::TinyVector< T, N, TTrait >::front(), and PLearn::TTensor< T >::subTensor(). |
|
Definition at line 251 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, and PLearn::TinyVector< T, N, TTrait >::size(). |
|
Definition at line 244 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, and PLearn::TinyVector< T, N, TTrait >::size(). Referenced by PLearn::TinyVector< T, N, TTrait >::back(), and PLearn::operator==(). |
|
Definition at line 315 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLearn::TinyVector< T, N, TTrait >::empty(), and PLERROR. |
|
first element
Definition at line 305 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLearn::TinyVector< T, N, TTrait >::empty(), and PLERROR. |
|
Definition at line 140 of file TinyVector.h. Referenced by PLearn::TinyVector< T, N, TTrait >::reserve(), and PLearn::TinyVector< T, N, TTrait >::resize(). |
|
Definition at line 272 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, and PLearn::TinyVector< T, N, TTrait >::size(). |
|
Unchecked element access.
Definition at line 261 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, and PLearn::TinyVector< T, N, TTrait >::size(). |
|
remove last element
Definition at line 387 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, PLearn::TinyVector< T, N, TTrait >::size(), and PLearn::TinyVector< T, N, TTrait >::size_type. |
|
add to end
Definition at line 377 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLERROR, PLearn::TinyVector< T, N, TTrait >::size(), PLearn::TinyVector< T, N, TTrait >::size_type, and x. Referenced by PLearn::TTensor< T >::DEPRECATEDsubTensor(), PLearn::TTensor< T >::operator[](), PLearn::TTensor< T >::selectDimensions(), and PLearn::TTensor< T >::subTensor(). |
|
make room for total of n elts
Definition at line 424 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::max_size(), and PLERROR. |
|
added elts init by val
Definition at line 411 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLearn::TinyVector< T, N, TTrait >::max_size(), PLERROR, PLearn::TinyVector< T, N, TTrait >::size(), PLearn::TinyVector< T, N, TTrait >::size_type, and val. Referenced by PLearn::TTensor< T >::lastElementPos(), PLearn::TTensor< T >::resize(), and PLearn::TTensorElementIterator< T >::TTensorElementIterator(). |
|
|
Other functions. otherwise uses Koenig lookup < if necessary for swap; Definition at line 435 of file TinyVector.h. References PLearn::TinyVector< T, N, TTrait >::arr, PLearn::TinyVector< T, N, TTrait >::size_type, and PLearn::swap(). |
|