15 #define DEBUG_FPRINTF(...)
16 #define DEBUG_PRINT(...)
17 #define DEBUG_EXIT(...)
58 for ( j = 0; j < n; j++ )
60 for ( i = 0; i < m; i++ )
62 a2[i+j*m] = a1[i+j*m];
101 const float value = 1.192092896E-7;
147 value = fabs ( a[0+0*m] );
149 for ( j = 0; j < n; j++ )
151 for ( i = 0; i < m; i++ )
153 if ( value < fabs ( a[i+j*m] ) )
155 value = fabs ( a[i+j*m] );
287 x = (
float * ) malloc ( n *
sizeof (
float ) );
291 for ( i = 0; i < n; i++ )
294 for ( j = 0; j < i; j++ )
296 dot = dot + a[i+j*n] * x[j];
298 x[i] = ( b[i] - dot ) / a[i+i*n];
349 x = (
float * ) malloc ( n *
sizeof (
float ) );
351 for ( j = n-1; 0 <= j; j-- )
354 for ( i = j+1; i < n; i++ )
356 x[j] = x[j] - x[i] * a[i+j*n];
358 x[j] = x[j] / a[j+j*n];
407 y = (
float * ) malloc ( n *
sizeof (
float ) );
409 for ( j = 0; j < n; j++ )
412 for ( i = 0; i < m; i++ )
414 y[j] = y[j] + a[i+j*m] * x[i];
463 for ( i = 1; i < n; i++ )
465 if ( value < r8vec[i] )
void r8mat_copy_new(int m, int n, float a1[], float a2[])
float * r8mat_mtv_new(int m, int n, float a[], float x[])
float r8mat_amax(int m, int n, float a[])
int i4_max(int i1, int i2)
float * r8mat_l_solve(int n, float a[], float b[])
float r8_max(float x, float y)
float r8vec_max(int n, float r8vec[])
int i4_min(int i1, int i2)
float * r8mat_lt_solve(int n, float a[], float b[])