bug fix in matrix inversion routine

This commit is contained in:
Francesco Cozzuto
2023-03-30 01:35:30 +02:00
parent 85f5fc43d7
commit b2d4f7dac4
2 changed files with 8 additions and 14 deletions
+1 -1
View File
@@ -985,7 +985,7 @@ copyMatrixWithoutRowAndCol(double *M, double *D, int n,
// Copy the lower left portion that comes
// after both the deleted column and row.
for (int i = del_row+1; i < n; i++)
for (int j = del_row+1; j < n; j++)
for (int j = del_col+1; j < n; j++)
D[(i-1) * (n-1) + (j-1)] = M[i * n + j];
// Copy the bottom portion that comes after
+1 -7
View File
@@ -7,13 +7,7 @@ bool lina_det(double *A, int n, double *det);
void lina_scale(double *A, double *B, double k, int m, int n);
void lina_transpose(double *A, double *B, int m, int n);
bool lina_inverse(double *M, double *D, int n);
void lina_conv(double *A, double *B, double *C,
int Aw, int Ah, int Bw, int Bh);
void lina_dot2(double *A, double *B, double *C,
int As, int Bs, int Cs,
int m, int n, int l);
void lina_conv(double *A, double *B, double *C, int Aw, int Ah, int Bw, int Bh);
bool lina_eig(double *M, double complex *E, int n);
void lina_reallyP(int *P, double *P2, int n);
int lina_decompLUP(double *A, double *L, double *U, int *P, int n);