|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
Defines a monotonic vector container type. More...
#include <monotonic_vector.h>
Public Types | |
| using | IteratorType = typename std::vector< TYPE >::iterator |
| Element iterator. | |
| using | ConstIteratorType = typename std::vector< TYPE >::const_iterator |
| Read-only element iterator. | |
Public Member Functions | |
| MonotonicVector (std::vector< TYPE > &values) | |
| Initialises a new instance of the MonotonicVector class. | |
| std::size_t | size () const noexcept |
| Gets the number of elements. | |
| const TYPE & | at (std::size_t index) const |
| Gets a specified element with bounds checking. | |
| TYPE & | operator[] (std::size_t index) |
| Gets a specified element with bounds checking. | |
| const TYPE & | operator[] (std::size_t index) const |
| Gets a specified read-only element with bounds checking. | |
| IteratorType | begin () noexcept |
| Gets an iterator to the beginning of the elements. | |
| IteratorType | end () noexcept |
| Gets an iterator to the element following the element of the vector. | |
| ConstIteratorType | begin () const noexcept |
| Gets an read-only iterator to the beginning of the elements. | |
| ConstIteratorType | end () const noexcept |
| Gets an read-only iterator to the element following the element of the vector. | |
| ConstIteratorType | cbegin () const noexcept |
| Gets an read-only iterator to the beginning of the elements. | |
| ConstIteratorType | cend () const noexcept |
| Gets an read-only iterator to the element following the element of the vector. | |
Defines a monotonic vector container type.
| TYPE | The type of the elements |
| using hgps::MonotonicVector< TYPE >::ConstIteratorType = typename std::vector<TYPE>::const_iterator |
Read-only element iterator.
| using hgps::MonotonicVector< TYPE >::IteratorType = typename std::vector<TYPE>::iterator |
Element iterator.
|
inline |
Initialises a new instance of the MonotonicVector class.
| values | The monotonic values |
| std::invalid_argument | if the values are not strict monotonic. |
|
inline |
Gets a specified element with bounds checking.
| index | The element index |
|
inlinenoexcept |
Gets an read-only iterator to the beginning of the elements.
|
inlinenoexcept |
Gets an iterator to the beginning of the elements.
|
inlinenoexcept |
Gets an read-only iterator to the beginning of the elements.
|
inlinenoexcept |
Gets an read-only iterator to the element following the element of the vector.
|
inlinenoexcept |
Gets an read-only iterator to the element following the element of the vector.
|
inlinenoexcept |
Gets an iterator to the element following the element of the vector.
|
inline |
Gets a specified element with bounds checking.
| index | The element index |
|
inline |
Gets a specified read-only element with bounds checking.
| index | The element index |
|
inlinenoexcept |
Gets the number of elements.