A container representing a vector. More...
#include <vector.hpp>
Public Types | |
using | size_type = std::size_t |
using | value_type = T |
Public Member Functions | |
Element access | |
constexpr T & | operator[] (size_type i) noexcept |
access specified element More... | |
constexpr const T & | operator[] (size_type i) const noexcept |
access specified element More... | |
Iterators | |
constexpr T * | begin () noexcept |
returns an iterator to the beginning More... | |
constexpr T * | end () noexcept |
returns an iterator to the end More... | |
constexpr const T * | cbegin () const noexcept |
returns an iterator to the beginning More... | |
constexpr const T * | cend () const noexcept |
returns an iterator to the end More... | |
Static Public Attributes | |
static constexpr size_type | size = N |
size of the vector More... | |
Related Functions | |
(Note that these are not member functions.) | |
vector deduction guides | |
template<typename T , typename... U> | |
vector (T, U...) -> vector< std::enable_if_t<(std::is_same_v< T, U > &&...), T >, 1+sizeof...(U)> | |
deduction guide for uniform initialization More... | |
template<typename T , std::size_t N> | |
vector (const T(&)[N]) -> vector< T, N > | |
deduction guide for aggregate initialization More... | |
Detailed Description
template<typename T, std::size_t N>
struct nil::crypto3::algebra::vector< T, N >
A container representing a vector.
- Template Parameters
-
T scalar type to contain N size of the vector
vector
is a container representing a vector.
It is an aggregate type similar to std::array
, and can be initialized with aggregate initialization or with the make_vector
function.
Member Typedef Documentation
◆ size_type
using nil::crypto3::algebra::vector< T, N >::size_type = std::size_t |
◆ value_type
using nil::crypto3::algebra::vector< T, N >::value_type = T |
Member Function Documentation
◆ begin()
|
inlineconstexprnoexcept |
returns an iterator to the beginning
- Returns
- an iterator to the beginning
Returns an iterator to the beginning of the vector.
◆ cbegin()
|
inlineconstexprnoexcept |
returns an iterator to the beginning
- Returns
- an iterator to the beginning
Returns an iterator to the beginning of the vector.
◆ cend()
|
inlineconstexprnoexcept |
returns an iterator to the end
- Returns
- an iterator past the end
Returns an iterator to the end of the vector.
◆ end()
|
inlineconstexprnoexcept |
returns an iterator to the end
- Returns
- an iterator past the end
Returns an iterator to the end of the vector.
◆ operator[]() [1/2]
|
inlineconstexprnoexcept |
access specified element
- Parameters
-
i position of the scalar element
- Returns
- the requested scalar element
Returns a reference to the scalar element in position i
, without bounds checking.
◆ operator[]() [2/2]
|
inlineconstexprnoexcept |
access specified element
- Parameters
-
i position of the scalar element
- Returns
- the requested scalar element
Returns a reference to the scalar element in position i
, without bounds checking.
Member Data Documentation
◆ size
|
staticconstexpr |
size of the vector
The documentation for this struct was generated from the following file: