projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f1c67
)
sweep.c: Move repeated call out of if ... else
author
John Darrington
<john@darrington.wattle.id.au>
Tue, 15 Nov 2011 14:20:59 +0000
(15:20 +0100)
committer
John Darrington
<john@darrington.wattle.id.au>
Tue, 15 Nov 2011 14:20:59 +0000
(15:20 +0100)
This line is identical for all cases, so it only needs to appear once.
lib/linreg/sweep.c
patch
|
blob
|
history
diff --git
a/lib/linreg/sweep.c
b/lib/linreg/sweep.c
index c218456418c75ccc450d452eeba21f1fcbbf5cda..7667e3a555db063502eae81dcdd8188921630872 100644
(file)
--- a/
lib/linreg/sweep.c
+++ b/
lib/linreg/sweep.c
@@
-106,20
+106,18
@@
reg_sweep (gsl_matrix * A, int last_col)
tmp = gsl_matrix_get (A, i, j) -
gsl_matrix_get (A, i, k)
* gsl_matrix_get (A, j, k) / sweep_element;
- gsl_matrix_set (B, i, j, tmp);
}
else if (j > k)
{
tmp = gsl_matrix_get (A, i, j) -
gsl_matrix_get (A, i, k)
* gsl_matrix_get (A, k, j) / sweep_element;
- gsl_matrix_set (B, i, j, tmp);
}
else
{
tmp = gsl_matrix_get (A, i, k) / sweep_element;
- gsl_matrix_set (B, i, j, tmp);
}
+ gsl_matrix_set (B, i, j, tmp);
}
}
/*