- row_i = ordered_cols[i];
- for (j = i; j < A->size2; j++)
- {
- row_j = ordered_cols[j];
- /*
- Use only the upper triangle of A.
- */
- if (row_j < row_k)
- {
- tmp = gsl_matrix_get (A, row_i, row_j) -
- gsl_matrix_get (A, row_i, row_k)
- * gsl_matrix_get (A, row_j, row_k) / sweep_element;
- gsl_matrix_set (B, row_i, row_j, tmp);
- }
- else if (row_j > row_k)
- {
- tmp = gsl_matrix_get (A, row_i, row_j) -
- gsl_matrix_get (A, row_i, row_k)
- * gsl_matrix_get (A, row_k, row_j) / sweep_element;
- gsl_matrix_set (B, row_i, row_j, tmp);
- }
- else
- {
- tmp = gsl_matrix_get (A, row_i, row_k) / sweep_element;
- gsl_matrix_set (B, row_i, row_j, tmp);
- }
- }
+ tmp = gsl_matrix_get (A, i, j) -
+ gsl_matrix_get (A, i, k)
+ * gsl_matrix_get (A, j, k) / sweep_element;