|
| | Vector () |
| |
|
| Vector (size_t size, const Type &value=Type()) |
| | Constructs a Vector of length "size" and sets the elements with the value from input "value".
|
| |
|
| Vector (const Vector< Type > &other) |
| | Copy constructor.
|
| |
| Vector & | operator= (const Vector &other) |
| | Assignment operator for fims::Vector.
|
| |
|
| Vector (const std::vector< Type > &other) |
| | Initialization constructor from std::vector<Type> type.
|
| |
|
| Vector (std::initializer_list< Type > init) |
| | Initialization constructor from std::initializer_list<Type> type.
|
| |
| Type & | operator[] (size_t pos) |
| | Returns a reference to the element at specified location pos. No bounds checking is performed.
|
| |
|
const Type & | operator[] (size_t n) const |
| | Returns a constant reference to the element at specified location pos. No bounds checking is performed.
|
| |
|
Type & | at (size_t n) |
| | Returns a reference to the element at specified location pos. Bounds checking is performed.
|
| |
|
const Type & | at (size_t n) const |
| | Returns a constant reference to the element at specified location pos. Bounds checking is performed.
|
| |
| Type & | get_force_scalar (size_t pos) |
| | If this vector is size 1 and pos is greater than zero, the first index is returned. If this vector has size greater than 1 and pos is greater than size, a invalid_argument exception is thrown. Otherwise, the value at index pos is returned.
|
| |
|
reference | front () |
| | Returns a reference to the first element in the container.
|
| |
|
const_reference | front () const |
| | Returns a constant reference to the first element in the container.
|
| |
|
reference | back () |
| | Returns a reference to the last element in the container.
|
| |
| const_reference | back () const |
| | Returns a constant reference to the last element in the container.
|
| |
|
pointer | data () |
| | Returns a pointer to the underlying data array.
|
| |
|
const_pointer | data () const |
| | Returns a constant pointer to the underlying data array.
|
| |
|
iterator | begin () |
| | Returns an iterator to the first element of the vector.
|
| |
|
iterator | end () |
| | Returns an iterator to the element following the last element of the vector.
|
| |
|
reverse_iterator | rbegin () |
| | Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector.
|
| |
|
reverse_iterator | rend () |
| | Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector.
|
| |
|
const_reverse_iterator | rbegin () const |
| | Returns a constant reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector.
|
| |
|
const_reverse_iterator | rend () const |
| | Returns a constant reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector.
|
| |
|
bool | empty () |
| | Checks whether the container is empty.
|
| |
|
size_type | size () const |
| | Returns the number of elements.
|
| |
|
size_type | max_size () const |
| | Returns the maximum possible number of elements.
|
| |
|
void | reserve (size_type cap) |
| | Reserves storage.
|
| |
|
size_type | capacity () |
| | Returns the number of elements that can be held in currently allocated storage.
|
| |
|
void | shrink_to_fit () |
| | Reduces memory usage by freeing unused memory.
|
| |
|
void | clear () |
| | Clears the contents.
|
| |
|
iterator | insert (const_iterator pos, const Type &value) |
| | Inserts value before pos.
|
| |
|
iterator | insert (const_iterator pos, size_type count, const Type &value) |
| | Inserts count copies of the value before pos.
|
| |
|
template<class InputIt > |
| iterator | insert (const_iterator pos, InputIt first, InputIt last) |
| | Inserts elements from range [first, last) before pos.
|
| |
|
iterator | insert (const_iterator pos, std::initializer_list< Type > ilist) |
| | Inserts elements from initializer list ilist before pos.
|
| |
|
template<class... Args> |
| iterator | emplace (const_iterator pos, Args &&...args) |
| | Constructs element in-place.
|
| |
|
iterator | erase (iterator pos) |
| | Removes the element at pos.
|
| |
|
iterator | erase (iterator first, iterator last) |
| | Removes the elements in the range [first, last).
|
| |
|
void | push_back (const Type &&value) |
| | Adds an element to the end.
|
| |
|
template<class... Args> |
| void | emplace_back (Args &&...args) |
| | Constructs an element in-place at the end.
|
| |
|
void | pop_back () |
| | Removes the last element.
|
| |
|
void | resize (size_t s) |
| | Changes the number of elements stored.
|
| |
|
void | swap (Vector &other) |
| | Swaps the contents.
|
| |
| | operator std::vector< Type > () |
| | Converts fims::Vector<Type> to std::vector<Type>
|
| |
| std::vector< Type > | to_std () const |
| | Convert fims::Vector to std::vector.
|
| |
| std::vector< Type > | to_tmb () const |
| | Convert fims::Vector to TMB vector type.
|
| |
| std::string | get_tag () const |
| | Gets the tag for the vector. A tag can represent anything and is not used internally by FIMS.
|
| |
|
void | set_tag (const std::string &tag) |
| | Sets the tag for the vector. A tag can be set to any string value and is not used internally by FIMS.
|
| |
Wrapper class for std::vector types. If this file is compiled with -DTMB_MODEL, conversion operators are defined for TMB vector types.
All std::vector functions are copied over from the std library. While some of these may not be called explicitly in FIMS, they may be required to run other std library functions.