main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
304 bytes
|
| Line | |
|---|
| 1 |
|
|---|
| 2 | void cholsl(float **a, int n, float p[], float b[], float x[]) {
|
|---|
| 3 | int i, k;
|
|---|
| 4 | float sum;
|
|---|
| 5 |
|
|---|
| 6 | for (i=0; i<=n; i++) {
|
|---|
| 7 | for (sum=b[i], k=i-1; k>=1; k--) sum -= a[i][k]*x[k];
|
|---|
| 8 | x[i]=sum/p[i];
|
|---|
| 9 | }
|
|---|
| 10 | for (i=n;i>=1;i--) {
|
|---|
| 11 | for (sum=x[i], k=i+1; k<=n; k++) sum -= a[k][i]*x[k];
|
|---|
| 12 | x[i]=sum/p[i];
|
|---|
| 13 | }
|
|---|
| 14 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.