This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
Classes | Macros | Functions
ArrayHelpers.hpp File Reference
#include "Array.hpp"
Include dependency graph for ArrayHelpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Incrementor< T, V >
 Utility class that acts as a functor to return incremental values. More...
 

Macros

#define USE_CONSTEXPR_ARRAY_HELPERS
 

Functions

template<class ForwardIt , class Generator >
void generate (ForwardIt first, ForwardIt last, Generator g)
 https://en.cppreference.com/w/cpp/algorithm/generate More...
 
template<class T , size_t N, class G >
Array< T, N > generateArray (G generator)
 Generate an array using the given generator. More...
 
template<size_t N, class G >
auto generateArray (G generator) -> Array< decltype(generator()), N >
 Generate an array using the given generator. More...
 
template<class T , size_t N, class U >
Array< T, N > copyAs (const Array< U, N > &src)
 Copy an Array to an Array of a different type. More...
 
template<class T , size_t N, class... Args>
Array< T, N > fillArray (Args... args)
 
template<class T , size_t N, class U , class V = U>
Array< T, N > generateIncrementalArray (U start=0, V increment=1)
 Generate an array where the first value is given, and the subsequent values are calculated as the previous value incremented with a given value:
\( x[0] = \mathrm{start} \)
\( x[k+1] = x[k] + \mathrm{increment} \) . More...
 
template<class T , size_t M, size_t N>
Array< T, M+N > cat (const Array< T, M > &a, const Array< T, N > &b)
 Concatenate two arrays. More...
 

Macro Definition Documentation

◆ USE_CONSTEXPR_ARRAY_HELPERS

#define USE_CONSTEXPR_ARRAY_HELPERS

Definition at line 10 of file ArrayHelpers.hpp.

Function Documentation

◆ generate()

template<class ForwardIt , class Generator >
void generate ( ForwardIt  first,
ForwardIt  last,
Generator  g 
)