Next: , Previous: TinyVec ctors, Up: TinyVector


7.3 Member functions

     TinyVector<T,N>::iterator                   begin();
     TinyVector<T,N>::const_iterator             begin() const;

Returns an STL-style iterator for the vector, positioned at the beginning of the data.

     TinyVector<T,N>::iterator                   end();
     TinyVector<T,N>::const_iterator             end() const;

Returns an STL-style iterator for the vector, positioned at the end of the data.

     T_numtype* [restrict]                       data();
     const T_numtype* [restrict]                 data() const;

Returns a pointer to the first element in the vector.

     int                                         length() const;

Returns the length of the vector (the template parameter N).

     T_numtype                                   operator()(int i) const;
     T_numtype&                                  operator()(int i);
     T_numtype                                   operator[](int i) const;
     T_numtype&                                  operator[](int i);

Returns the ith element of the vector. If the code is compiled with debugging enabled (-DBZ_DEBUG), bounds checking is performed.