OpenShot Audio Library | OpenShotAudio 0.4.0
|
#include <juce_Matrix.h>
Public Member Functions | |
Matrix (size_t numRows, size_t numColumns) | |
Matrix (size_t numRows, size_t numColumns, const ElementType *dataPointer) | |
Matrix (const Matrix &)=default | |
Matrix (Matrix &&) noexcept=default | |
Matrix & | operator= (const Matrix &)=default |
Matrix & | operator= (Matrix &&) noexcept=default |
size_t | getNumRows () const noexcept |
size_t | getNumColumns () const noexcept |
Array< size_t > | getSize () const noexcept |
void | clear () noexcept |
Matrix & | swapRows (size_t rowOne, size_t rowTwo) noexcept |
Matrix & | swapColumns (size_t columnOne, size_t columnTwo) noexcept |
ElementType | operator() (size_t row, size_t column) const noexcept |
ElementType & | operator() (size_t row, size_t column) noexcept |
ElementType * | getRawDataPointer () noexcept |
const ElementType * | getRawDataPointer () const noexcept |
Matrix & | operator+= (const Matrix &other) noexcept |
Matrix & | operator-= (const Matrix &other) noexcept |
Matrix & | operator*= (ElementType scalar) noexcept |
Matrix | operator+ (const Matrix &other) const |
Matrix | operator- (const Matrix &other) const |
Matrix | operator* (ElementType scalar) const |
Matrix | operator* (const Matrix &other) const |
Matrix & | hadarmard (const Matrix &other) noexcept |
bool | operator== (const Matrix &other) const noexcept |
bool | isSquare () const noexcept |
bool | isVector () const noexcept |
bool | isOneColumnVector () const noexcept |
bool | isOneRowVector () const noexcept |
bool | isNullMatrix () const noexcept |
bool | solve (Matrix &b) const noexcept |
String | toString () const |
ElementType * | begin () noexcept |
ElementType * | end () noexcept |
const ElementType * | begin () const noexcept |
const ElementType * | end () const noexcept |
Static Public Member Functions | |
static Matrix | identity (size_t size) |
static Matrix | toeplitz (const Matrix &vector, size_t size) |
static Matrix | hankel (const Matrix &vector, size_t size, size_t offset=0) |
static Matrix | hadarmard (const Matrix &a, const Matrix &b) |
static bool | compare (const Matrix &a, const Matrix &b, ElementType tolerance=0) noexcept |
General matrix and vectors class, meant for classic math manipulation such as additions, multiplications, and linear systems of equations solving.
Definition at line 38 of file juce_Matrix.h.
|
inline |
Creates a new matrix with a given number of rows and columns.
Definition at line 43 of file juce_Matrix.h.
Referenced by compare(), hadarmard(), hadarmard(), hankel(), identity(), Matrix(), Matrix(), operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator=(), solve(), swapColumns(), swapRows(), and toeplitz().
|
inline |
Creates a new matrix with a given number of rows and columns, with initial data coming from an array, stored in row-major order.
Definition at line 53 of file juce_Matrix.h.
|
default |
Creates a copy of another matrix.
|
defaultnoexcept |
Moves a copy of another matrix.
|
inlinenoexcept |
Definition at line 210 of file juce_Matrix.h.
|
inlinenoexcept |
Definition at line 207 of file juce_Matrix.h.
|
inlinenoexcept |
Fills the contents of the matrix with zeroes.
Definition at line 101 of file juce_Matrix.h.
Referenced by Matrix().
|
staticnoexcept |
Compare to matrices with a given tolerance
Definition at line 146 of file juce_Matrix.cpp.
|
inlinenoexcept |
Definition at line 211 of file juce_Matrix.h.
|
inlinenoexcept |
Definition at line 208 of file juce_Matrix.h.
|
inlinenoexcept |
Returns the number of columns in the matrix.
Definition at line 93 of file juce_Matrix.h.
Referenced by operator*().
|
inlinenoexcept |
Returns the number of rows in the matrix.
Definition at line 90 of file juce_Matrix.h.
Referenced by getNumRows(), and operator*().
|
inlinenoexcept |
Returns a pointer to the raw data of the matrix object, ordered in row-major order (for reading).
Definition at line 133 of file juce_Matrix.h.
|
inlinenoexcept |
Returns a pointer to the raw data of the matrix object, ordered in row-major order (for modifying).
Definition at line 128 of file juce_Matrix.h.
Referenced by operator*().
|
inlinenoexcept |
Returns an Array of 2 integers with the number of rows and columns in the matrix.
Definition at line 98 of file juce_Matrix.h.
|
inlinestatic |
Does a hadarmard product with a and b returns the result.
Definition at line 165 of file juce_Matrix.h.
|
inlinenoexcept |
Does a hadarmard product with the receiver and other and stores the result in the receiver
Definition at line 162 of file juce_Matrix.h.
Referenced by hadarmard().
|
static |
Creates a squared size x size Hankel Matrix from a vector with an optional offset.
vector | The vector from which the Hankel matrix should be generated. Its number of rows should be at least 2 * (size - 1) + 1 |
size | The size of resulting square matrix. |
offset | An optional offset into the given vector. |
Definition at line 59 of file juce_Matrix.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designFIRLowpassLeastSquaresMethod(), and operator=().
|
static |
Creates the identity matrix
Definition at line 30 of file juce_Matrix.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designFIRLowpassLeastSquaresMethod(), and operator=().
|
inlinenoexcept |
Tells if the matrix is a null matrix
Definition at line 188 of file juce_Matrix.h.
|
inlinenoexcept |
Tells if the matrix is a one column vector
Definition at line 182 of file juce_Matrix.h.
Referenced by hankel(), isVector(), and toeplitz().
|
inlinenoexcept |
Tells if the matrix is a one row vector
Definition at line 185 of file juce_Matrix.h.
Referenced by isVector().
|
inlinenoexcept |
Tells if the matrix is a square matrix
Definition at line 176 of file juce_Matrix.h.
|
inlinenoexcept |
Tells if the matrix is a vector
Definition at line 179 of file juce_Matrix.h.
|
inlinenoexcept |
Returns the value of the matrix at a given row and column (for reading).
Definition at line 112 of file juce_Matrix.h.
|
inlinenoexcept |
Returns the value of the matrix at a given row and column (for modifying).
Definition at line 119 of file juce_Matrix.h.
Matrix< ElementType > juce::dsp::Matrix< ElementType >::operator* | ( | const Matrix< ElementType > & | other | ) | const |
Matrix multiplication
Definition at line 111 of file juce_Matrix.cpp.
|
inline |
Scalar multiplication
Definition at line 156 of file juce_Matrix.h.
|
inlinenoexcept |
Scalar multiplication
Definition at line 143 of file juce_Matrix.h.
|
inline |
Addition of two matrices
Definition at line 150 of file juce_Matrix.h.
|
inlinenoexcept |
Addition of two matrices
Definition at line 137 of file juce_Matrix.h.
|
inline |
Addition of two matrices
Definition at line 153 of file juce_Matrix.h.
|
inlinenoexcept |
Subtraction of two matrices
Definition at line 140 of file juce_Matrix.h.
|
default |
Creates a copy of another matrix.
|
defaultnoexcept |
Moves another matrix into this one
|
inlinenoexcept |
Definition at line 172 of file juce_Matrix.h.
|
noexcept |
Solves a linear system of equations represented by this object and the argument b, using various algorithms depending on the size of the arguments.
The matrix must be a square matrix N times N, and b must be a vector N times 1, with the coefficients of b. After the execution of the algorithm, the vector b will contain the solution.
Returns true if the linear system of equations was successfully solved.
Definition at line 163 of file juce_Matrix.cpp.
|
noexcept |
Swaps the contents of two columns in the matrix and returns a reference to itself.
Definition at line 78 of file juce_Matrix.cpp.
|
noexcept |
Swaps the contents of two rows in the matrix and returns a reference to itself.
Definition at line 94 of file juce_Matrix.cpp.
|
static |
Creates a Toeplitz Matrix from a vector with a given squared size
Definition at line 41 of file juce_Matrix.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designFIRLowpassLeastSquaresMethod(), and operator=().
String juce::dsp::Matrix< ElementType >::toString | ( | ) | const |
Returns a String displaying in a convenient way the matrix contents.
Definition at line 276 of file juce_Matrix.cpp.