Created
July 10, 2017 18:00
-
-
Save wrathematics/1c0dedae491458cb816372a099b6a881 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static inline int get_rank(int m, int n, double *qr, double tol) | |
{ | |
int i; | |
const double minval = fabs(tol*qr[0]); | |
const int minmn = m > n ? n : m; | |
for (i=1; i<minmn; i++) | |
{ | |
if (fabs(qr[i + m*i]) < minval) | |
return i; | |
} | |
return minmn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment