|
| template<typename FUNCTION , std::enable_if_t< std::is_invocable_r_v< TYPE, FUNCTION &, TYPE >||std::is_invocable_v< FUNCTION &, TYPE, Result & >, int > = 0> |
| | Table (FUNCTION function) |
| | Construct and fill a table from a value-returning or Result-writing callable.
|
| |
| | Table (TYPE(*function)(TYPE, TYPE), TYPE arg) |
| |
| | Table (std::initializer_list< TYPE > values) |
| |
| TYPE | operator[] (float index) |
| |
| unsigned int | size () const |
| | The current number of items in the array.
|
| |
| void | add (const TYPE &item) |
| | Add the specified item to the end of the array.
|
| |
| TYPE * | add () |
| | Add a blank item to the end of the array, returning a pointer that allows the item to be modified.
|
| |
| void | clear () |
| | Clear the array contents. Only resets the item count, without wiping memory.
|
| |
| float | max () const |
| | Find the maximum value in the array.
|
| |
| float | mean () const |
| | Find the mean average of values in the array.
|
| |
| float | rms () const |
| | Find the root mean squared (RMS) average of values in the array.
|
| |
| void | normalise (float target=1.f, int mode=Peak) |
| | Normalises values in the array to the specified target, based on peak, mean, or RMS value;.
|
| |
| TYPE & | operator[] (int index) |
| | Returns a reference to the array item at the given index.
|
| |
| const TYPE & | operator[] (int index) const |
| | Returns a read-only reference to the array item at the given index.
|
| |
template<typename TYPE, int SIZE>
struct klang::Table< TYPE, SIZE >
Definition at line 4548 of file klang.h.