Skip to content

Commit

Permalink
Update lsqadj.c
Browse files Browse the repository at this point in the history
long time bug that was not tested properly because in all liboptv we never used submatrix multiplication. so n == n_large in practice, but for n < n_large this is wrong. 
fixed it due to the thorough testing in Python
  • Loading branch information
alexlib committed Oct 24, 2023
1 parent 2c120e1 commit 7c91346
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions liboptv/src/lsqadj.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ void ata (double *a, double *ata, int m, int n, int n_large ) {
{
for (j = 0; j < n; j++)
{
*(ata+i*n_large+j) = 0.0;
*(ata+i*n+j) = 0.0;
for (k = 0; k < m; k++)
*(ata+i*n_large+j) += *(a+k*n_large+i) * *(a+k*n_large+j);
*(ata+i*n+j) += *(a+k*n_large+i) * *(a+k*n_large+j);
}
}
}
Expand Down

0 comments on commit 7c91346

Please sign in to comment.