2022-10-17 14:56:32 +02:00
|
|
|
#pragma once
|
|
|
|
|
2022-09-22 14:37:00 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
void print_dm(const double* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
|
|
|
{
|
|
|
|
printf("%s = \n", name);
|
|
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
|
|
{
|
|
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
|
|
{
|
|
|
|
printf("%9.3f ", mat[i * ldm + j]);
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void print_im(const int* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
2022-09-09 17:15:12 +02:00
|
|
|
{
|
|
|
|
printf("%s = \n", name);
|
|
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
|
|
{
|
|
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
|
|
{
|
2022-09-22 14:37:00 +02:00
|
|
|
printf("%d ", mat[i * ldm + j]);
|
2022-09-09 17:15:12 +02:00
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void print_m_t(const double* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
|
|
|
{
|
|
|
|
printf("%s = \n", name);
|
|
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
|
|
{
|
|
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
|
|
{
|
2022-09-23 18:57:54 +02:00
|
|
|
printf("%9.3f ", mat[j * ldm + i]);
|
2022-09-09 17:15:12 +02:00
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|