mirror of
https://github.com/TREX-CoE/Sherman-Morrison.git
synced 2024-12-26 06:15:08 +01:00
Fixed minor bug
This commit is contained in:
parent
177411f472
commit
c9d1abd29d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user