26 #include <grass/gis.h> 
   27 #include <grass/interpf.h> 
   28 #include <grass/gmath.h> 
   42     int n1, k1, k2, k, i1, 
l, m, i, j;
 
   43     double fstar2 = params->
fi * params->
fi / 4.;
 
   44     static double *A = 
NULL;
 
   46     double rsin = 0, rcos = 0, teta, scale = 0; 
 
   50         teta = params->
theta / 57.295779;       
 
   64             fprintf(stderr, 
"Cannot allocate memory for A\n");
 
   77     for (k = 1; k <= n_points; k++) {
 
   88     for (k = 1; k <= n_points; k++) {
 
   92         if (params->
rsm < 0.) { 
 
   93             A[i1] = -points[k - 1].
sm;  
 
  102         for (l = k2; l <= n_points; l++) {
 
  103             xx = points[k - 1].
x - points[l - 1].
x;
 
  104             yy = points[k - 1].
y - points[l - 1].
y;
 
  108                 xxr = xx * rcos + yy * rsin;
 
  109                 yyr = yy * rcos - xx * rsin;
 
  112                 r = scale * xx * xx + yy * yy;
 
  113                 rfsta2 = fstar2 * (scale * xx * xx + yy * yy);
 
  116                 r = xx * xx + yy * yy;
 
  117                 rfsta2 = fstar2 * (xx * xx + yy * yy);
 
  121                 fprintf(stderr, 
"ident. points in segm.  \n");
 
  122                 fprintf(stderr, 
"x[%d]=%f,x[%d]=%f,y[%d]=%f,y[%d]=%f\n",
 
  123                         k - 1, points[k - 1].x, l - 1, points[l - 1].x, k - 1,
 
  124                         points[k - 1].
y, l - 1, points[l - 1].
y);
 
  128             A[i1] = params->
interp(r, params->
fi);
 
  137     for (k = 1; k <= n1; k++) {
 
  140         for (l = k2; l <= n1; l++) {
 
  141             m = (l - 1) * n1 + k;
 
  143             amaxa = 
amax1(A[m], amaxa);
 
  147     for (i = 0; i <= n_points; i++) {
 
  148         for (j = 0; j <= n_points; j++) {
 
  154     if (
G_ludcmp(matrix, n_points + 1, indx, &d) <= 0) {        
 
  156         fprintf(stderr, 
"G_ludcmp() failed! n=%d\n", n_points);
 
int IL_matrix_create(struct interp_params *, struct triple *, int, double **, int *)
double amax1(double, double)
int G_ludcmp(double **a, int n, int *indx, double *d)
double * G_alloc_vector(size_t n)
Vector matrix memory allocation.