25 #include "pips_config.h"
63 #define A(i,j) a[n*i + j]
88 float tiny = 0.000001;
93 for (i=0; i<n; i++ ) {
95 for ( j=0; j<n; j++) {
96 if ( fabs(
A(i,j)) > aamax ) {
101 if ( aamax == 0.0 ) {
102 fprintf(stderr,
"Singular matrix -- No non-zero element\n");
103 user_error(
"lu_decomposition",
"Module does not terminate\n");
109 for ( j=0; j<n; j++ ) {
110 for ( i=0; i<=j-1; i++ ) {
112 for ( k=0; k<i; k++) {
120 for ( i=j; (i<n) ; i++ ) {
122 for ( k=0; k<j; k++ ) {
126 dum = vv[i]*fabs(
sum);
127 if ( dum >= aamax ) {
134 for ( k=0; k<n; k++ ) {
148 for ( i=j+1; i<n; i++ ) {
166 for (i=0; i<n; i++ ) {
171 for ( j=ii; j<=i-1; j++ ) {
175 else if (
sum != 0.0 ) {
182 for ( i=n-1; i>=0; i-- ) {
185 for ( j=i+1; j < n; j++ ) {
196 #define Y(i,j) y[n*i + j]
205 float *y = (
float *)
malloc(
sizeof(
float) * n * n);
208 for (i=0; i<n; i++ ) {
209 for ( j=0; j<n; j++ )
216 for ( j=0; j<n; j++ ) {
219 for ( j=0; j<n; j++ )
220 for ( i=0; i<n; i++ )
#define Y(i, j)
Added by AP, March 23rd 93: allows the simulation of a two-dimensional array with a mono-dimensional ...
void lu_decomposition(float *a, int n, int *indx, int *pd)
comp_matrice.c
void lu_back_substitution(float *a, int n, int *indx, float *b)
#define A(i, j)
comp_matrice.c
void float_matrice_inversion(float *a, int n, int *indx, int *pd)
#define MAX_CONTROLS_IN_UNSTRUCTURED
#define user_error(fn,...)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
t_real sum(int n1, int n2, int n3, t_real u[n1][n2][n3])