6.5.0.27846 with
SonarJava
4.15.0.12310.private static double selectPivot(double[][] matrix) {
double maxLineQuotient = 0.0;
int size = matrix.length;
swapIndex = 0;
for (int i = 0; i < size; i++) {
// calculate row sum
double lineQuotient = 0.0;
for (int j = 0; j < size; j++) {
lineQuotient += Math.abs(matrix[i][j]);
}
// skip row if sum is zero
if (lineQuotient == 0.0) {
continue;
}
// calculate the line quotient a[i][0]/sum
lineQuotient = Math.abs(matrix[i][0]) / lineQuotient;
// search the greatest line quotient
if (lineQuotient > maxLineQuotient) {
maxLineQuotient = lineQuotient;
swapIndex = i;
}
}
if (swapIndex > 0) {
// swap line 0 with pivot line
swapLines(matrix, 0, swapIndex);
}
// return pivot element
return matrix[0][0];
}
if (swapIndex > 0)
"Change this condition so that it does not always evaluate to "false""--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/483ceb80-b018-4de9-9f11-90f5be5d3184%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Senior Developer