|
Vital
|
A structure representing a 4x1 matrix of poly_float rows. More...
#include <matrix.h>
Public Member Functions | |
| matrix () | |
| Default constructor leaves rows uninitialized. | |
| matrix (poly_float r0, poly_float r1, poly_float r2, poly_float r3) | |
| Constructs a matrix with specified rows. | |
| force_inline void | transpose () |
| Transposes the matrix in-place. | |
| force_inline void | interpolateColumns (const matrix &other, poly_float t) |
| Linearly interpolates each column of the matrix towards another matrix. | |
| force_inline void | interpolateRows (const matrix &other, poly_float t) |
Performs row-wise interpolation, using a separate interpolation factor from each row of t. | |
| force_inline poly_float | sumRows () |
| Sums all the rows together. | |
| force_inline poly_float | multiplyAndSumRows (const matrix &other) |
| Multiplies and sums corresponding rows of this matrix with another matrix. | |
Public Attributes | |
| poly_float | row0 |
| poly_float | row1 |
| poly_float | row2 |
| poly_float | row3 |
| The four rows of the matrix as poly_float values. | |
A structure representing a 4x1 matrix of poly_float rows.
This structure holds four poly_float rows and provides utility functions for operations such as transposing and interpolating between matrix states. It is designed to work with poly_float, a SIMD-friendly vector type used throughout Vital's DSP code.
Each rowN is a poly_float vector representing one row of the matrix. Although named "matrix," it essentially acts as a 4-row structure that can be manipulated for certain vectorized math operations, including transposing these rows into columns and performing interpolations.
|
inline |
Default constructor leaves rows uninitialized.
|
inline |
Constructs a matrix with specified rows.
| r0 | The first row. |
| r1 | The second row. |
| r2 | The third row. |
| r3 | The fourth row. |
|
inline |
Linearly interpolates each column of the matrix towards another matrix.
The same interpolation factor t is applied to each column.
| other | The target matrix to interpolate towards. |
| t | The interpolation factor (0.0 = original, 1.0 = other). |
|
inline |
Performs row-wise interpolation, using a separate interpolation factor from each row of t.
Each element of t corresponds to one row.
| other | The target matrix to interpolate towards. |
| t | A poly_float containing individual interpolation factors per row. |
|
inline |
Multiplies and sums corresponding rows of this matrix with another matrix.
| other | The other matrix to multiply and sum rows with. |
|
inline |
Sums all the rows together.
|
inline |
Transposes the matrix in-place.
This uses poly_float's static transpose function, effectively transposing 4x1 vectors treating them as a 4x4 set of values for vector operations.
| poly_float vital::matrix::row0 |
| poly_float vital::matrix::row1 |
| poly_float vital::matrix::row2 |
| poly_float vital::matrix::row3 |
The four rows of the matrix as poly_float values.