~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to raster/r.random.surface/gennorm.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* gennorm.c                                                    */
2
 
 
3
 
#undef TRACE
4
 
#undef DEBUG
5
 
 
6
 
#undef MAIN
7
2
#include <math.h>
8
3
#include <grass/gis.h>
9
4
#include "ransurf.h"
10
5
 
11
 
 
12
6
void GenNorm(void)
13
7
{
14
8
    double t, b, c, sqr;
15
9
    int i;
16
10
 
17
 
    FUNCTION(GenNorm);
 
11
    G_debug(2, "GenNorm()");
18
12
 
19
13
    Norm = (double *)G_malloc(SIZE_OF_DISTRIBUTION * sizeof(double));
20
14
    sqr = 1 / sqrt(2 * PI);
23
17
        t = ((double)(i - SIZE_OF_DISTRIBUTION / 2)) * DELTA_T;
24
18
        b = exp(-t * t / 2.0) * sqr * DELTA_T;
25
19
        c = c + b;
26
 
        DOUBLE(c);
 
20
        G_debug(3, "(c):%.12lf", c);
27
21
        Norm[i] = c;
28
22
    }
29
 
    RETURN;
 
23
 
 
24
    return;
30
25
}