MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
marvin::math::Hadamard< SampleType, size > Class Template Reference

A helper class to apply an NxN Hadamard matrix to a given input array-like. More...

#include <marvin_MixMatrix.h>

Static Public Member Functions

static void recursiveUnscaled (SampleType *data)
 
static void inPlace (SampleType *data)
 

Detailed Description

template<FloatType SampleType, int size>
requires (isPowerOfTwo<size>())
class marvin::math::Hadamard< SampleType, size >

A helper class to apply an NxN Hadamard matrix to a given input array-like.

size must be a power of two. Example usage:

std::array<float, 4> arr{ 1, 0, 0, 0 };
marvin::utils::Hadamard<float, 4>::inPlace(arr.data());

Member Function Documentation

◆ inPlace()

template<FloatType SampleType, int size>
static void marvin::math::Hadamard< SampleType, size >::inPlace ( SampleType * data)
inlinestatic

Multiplies an input array-like of size by a size x size Hadamard matrix.

Parameters
dataA pointer to the internal data of the array-like to apply the Hadamard to.

◆ recursiveUnscaled()

template<FloatType SampleType, int size>
static void marvin::math::Hadamard< SampleType, size >::recursiveUnscaled ( SampleType * data)
inlinestatic

Used internally by inPlace to generate an NxN Hadamard via recursion - probably shouldn't be in the public API.

Parameters
dataA pointer to the internal data of the array-like to apply the Householder to.

The documentation for this class was generated from the following file: