Fixed minor bug

This commit is contained in:
Francois Coppens 2021-09-21 13:42:44 +02:00
parent 177411f472
commit c9d1abd29d

View File

@ -14,6 +14,7 @@ int main() {
new double[M * M]; // A diagonal matrix with the digonal elements of A new double[M * M]; // A diagonal matrix with the digonal elements of A
double *Ar = new double[M * M]; // The update matrix double *Ar = new double[M * M]; // The update matrix
double *A0_inv = new double[M * M]; // The inverse double *A0_inv = new double[M * M]; // The inverse
double breakdown = 1e-3;
// Fill with zeros // Fill with zeros
for (i = 0; i < M; i++) { for (i = 0; i < M; i++) {
@ -51,7 +52,7 @@ int main() {
// Define pointers dim and n_updates to use in Sherman-Morrison(...) function // Define pointers dim and n_updates to use in Sherman-Morrison(...) function
// call // call
MaponiA3(A0_inv, M, M, Ar, Ar_index); MaponiA3(A0_inv, M, M, Ar, Ar_index, breakdown);
showMatrix(A0_inv, M, "A0_inv"); showMatrix(A0_inv, M, "A0_inv");
// Deallocate all vectors and matrices // Deallocate all vectors and matrices