Добавлены функции для матриц 2x3 и 3x2 / New functions for matrixes 2x3 and 3x2 have been added

This commit is contained in:
Andrey Pokidov 2024-11-15 23:07:28 +07:00
parent 67f66e2127
commit 07c1330858
11 changed files with 902 additions and 52 deletions

View file

@ -105,23 +105,9 @@ void dp_matrix_product_2x3_at_3x2(const DPMatrix2x3* matrix1, const DPMatrix3x2*
// ========== Matrix Product 3x2 at 2x3 ========= //
void sp_matrix_product_3x2_at_2x3(const SPMatrix3x2* matrix1, const SPMatrix2x3* matrix2, SPMatrix2x2* result)
{
result->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1 + matrix1->r1c3 * matrix2->r3c1;
result->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2 + matrix1->r1c3 * matrix2->r3c2;
void sp_matrix_product_3x2_at_2x3(const SPMatrix3x2* matrix1, const SPMatrix2x3* matrix2, SPMatrix2x2* result);
result->r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1 + matrix1->r2c3 * matrix2->r3c1;
result->r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2 + matrix1->r2c3 * matrix2->r3c2;
}
void dp_matrix_product_3x2_at_2x3(const DPMatrix3x2* matrix1, const DPMatrix2x3* matrix2, DPMatrix2x2* result)
{
result->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1 + matrix1->r1c3 * matrix2->r3c1;
result->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2 + matrix1->r1c3 * matrix2->r3c2;
result->r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1 + matrix1->r2c3 * matrix2->r3c1;
result->r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2 + matrix1->r2c3 * matrix2->r3c2;
}
void dp_matrix_product_3x2_at_2x3(const DPMatrix3x2* matrix1, const DPMatrix2x3* matrix2, DPMatrix2x2* result);
// ========== Matrix Product 3x2 at 3x3 ========= //