template<class T, size_t N>
struct Array< T, N >
An array wrapper for easy copying, comparing, and iterating.
- Template Parameters
-
| T | The type of the elements in the array. |
| N | The number of elements in the array. |
- Examples
- ArraySort.ino, and Numeric.ino.
Definition at line 32 of file Array.hpp.
|
| T & | operator[] (size_t index) |
| | Get the element at the given index. More...
|
| |
| const T & | operator[] (size_t index) const |
| | Get the element at the given index. More...
|
| |
| T * | begin () |
| | Get a pointer to the first element. More...
|
| |
| const T * | begin () const |
| | Get a pointer to the first element. More...
|
| |
| T * | end () |
| | Get a pointer to the memory beyond the array. More...
|
| |
| const T * | end () const |
| | Get a pointer to the memory beyond the array. More...
|
| |
| bool | operator== (const Array< T, N > &rhs) const |
| | Check the equality of all elements in two arrays. More...
|
| |
| bool | operator!= (const Array< T, N > &rhs) const |
| | Check the inequality of all elements in two arrays. More...
|
| |
| template<size_t Start = 0, size_t End = N - 1> |
| ArraySlice< T, abs_diff(Start, End)+1,(End< Start), false > | slice () |
| | Get a view on a slice of the Array. More...
|
| |
| template<size_t Start = 0, size_t End = N - 1> |
| ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > | slice () const |
| | Get a read-only view on a slice of the Array. More...
|
| |
| template<size_t Start = 0, size_t End = N - 1> |
| ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > | cslice () const |
| | Get a read-only view on a slice of the Array. More...
|
| |
| template<size_t Start, size_t End> |
| auto | slice () -> ArraySlice< T, abs_diff(Start, End)+1,(End< Start), false > |
| |
| template<size_t Start, size_t End> |
| auto | slice () const -> ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > |
| |
|
(Note that these are not member functions.)
|
| template<class T1 , class T2 , size_t N1, size_t N2> |
| Array< decltype(T1 {}+T2 {}), N1 > | operator+ (const Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| | Array + Array. More...
|
| |
| template<class T1 , class T2 , size_t N1, size_t N2> |
| Array< T1, N1 > & | operator+= (Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| | Array += Array. More...
|
| |
| template<class T1 , class T2 , size_t N1, size_t N2> |
| Array< decltype(T1 {} - T2 {}), N1 > | operator- (const Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| | Array - Array. More...
|
| |
| template<class T1 , class T2 , size_t N1, size_t N2> |
| Array< T1, N1 > & | operator-= (Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| | Array -= Array. More...
|
| |
| template<class T1 , class T2 , size_t N1> |
| Array< decltype(T1 {} *T2 {}), N1 > | operator* (const Array< T1, N1 > &a, T2 b) |
| | Array * Scalar. More...
|
| |
| template<class T1 , class T2 , size_t N2> |
| Array< decltype(T1 {} *T2 {}), N2 > | operator* (T1 a, const Array< T2, N2 > &b) |
| | Scalar * Array. More...
|
| |
| template<class T1 , class T2 , size_t N1> |
| Array< T1, N1 > & | operator*= (Array< T1, N1 > &a, T2 b) |
| | Array *= Scalar. More...
|
| |
| template<class T1 , class T2 , size_t N1> |
| Array< decltype(T1 {}/T2 {}), N1 > | operator/ (const Array< T1, N1 > &a, T2 b) |
| | Array / Scalar. More...
|
| |
| template<class T1 , class T2 , size_t N1> |
| Array< T1, N1 > & | operator/= (Array< T1, N1 > &a, T2 b) |
| | Array /= Scalar. More...
|
| |
| template<class T , size_t N> |
| Array< decltype(-T {}), N > | operator- (const Array< T, N > &a) |
| | -Array More...
|
| |