Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::Matrix< N, SampleType > Struct Template Reference

NxN matrix stored in row-major order. More...

#include <matrix.hpp>

Public Member Functions

SampleType & at (int row, int col)
SampleType at (int row, int col) const
SampleType & operator() (int row, int col)
SampleType operator() (int row, int col) const
Matrix operator* (const Matrix &other) const
 Matrix multiply.
Matrix operator* (SampleType scalar) const
 Scalar multiply.
Matrix operator+ (const Matrix &other) const
 Matrix add.
Matrix transposed () const
 Transpose.
bool operator== (const Matrix &other) const

Static Public Member Functions

static Matrix identity ()
 Identity matrix.
static Matrix zero ()
 Zero matrix.

Public Attributes

std::array< SampleType, N *N > data {}

Detailed Description

template<int N, typename SampleType = float>
struct pulp::signal::Matrix< N, SampleType >

NxN matrix stored in row-major order.

RT contract: fixed-size matrix construction, element access, arithmetic, transpose, determinants, transforms, and comparison allocate no memory.

Member Function Documentation

◆ at() [1/2]

template<int N, typename SampleType = float>
SampleType & pulp::signal::Matrix< N, SampleType >::at ( int row,
int col )
inline

◆ at() [2/2]

template<int N, typename SampleType = float>
SampleType pulp::signal::Matrix< N, SampleType >::at ( int row,
int col ) const
inline

◆ identity()

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::identity ( )
inlinestatic

Identity matrix.

◆ operator()() [1/2]

template<int N, typename SampleType = float>
SampleType & pulp::signal::Matrix< N, SampleType >::operator() ( int row,
int col )
inline

◆ operator()() [2/2]

template<int N, typename SampleType = float>
SampleType pulp::signal::Matrix< N, SampleType >::operator() ( int row,
int col ) const
inline

◆ operator*() [1/2]

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::operator* ( const Matrix< N, SampleType > & other) const
inline

Matrix multiply.

◆ operator*() [2/2]

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::operator* ( SampleType scalar) const
inline

Scalar multiply.

◆ operator+()

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::operator+ ( const Matrix< N, SampleType > & other) const
inline

Matrix add.

◆ operator==()

template<int N, typename SampleType = float>
bool pulp::signal::Matrix< N, SampleType >::operator== ( const Matrix< N, SampleType > & other) const
inline

◆ transposed()

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::transposed ( ) const
inline

Transpose.

◆ zero()

template<int N, typename SampleType = float>
Matrix pulp::signal::Matrix< N, SampleType >::zero ( )
inlinestatic

Zero matrix.

Member Data Documentation

◆ data

template<int N, typename SampleType = float>
std::array<SampleType, N * N> pulp::signal::Matrix< N, SampleType >::data {}

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/matrix.hpp