pgLatLon

changeset 45:10640afbe2ea

Use the term "numerical integration" instead of "Monte Carlo simulation" in documentation and comments (since no real randomness is involved)
author jbe
date Tue Oct 25 22:15:17 2016 +0200 (2016-10-25)
parents fa06fed5e5b4
children 3cbce515387f
files README.html README.mkd latlon-v0008.c
line diff
     1.1 --- a/README.html	Tue Oct 25 18:54:59 2016 +0200
     1.2 +++ b/README.html	Tue Oct 25 22:15:17 2016 +0200
     1.3 @@ -513,12 +513,12 @@
     1.4  points in the <code>ecluster</code>.</li>
     1.5  </ul>
     1.6  
     1.7 -<p>The function interally uses a Monte Carlo simulation to compute the result. The
     1.8 -third parameter (which defaults to 10000) can be used to adjust the number of
     1.9 -samples taken. It is ensured that the penalty is always positive, i.e. results
    1.10 -returned by the <code>fair_distance</code> function are always equal to or greater than
    1.11 -the results returned by the <code>distance</code> function regardless of stochastic
    1.12 -effects.</p>
    1.13 +<p>The function interally uses numerical integration (Monte Carlo like) to compute
    1.14 +the result. The third parameter (which defaults to 10000) can be used to adjust
    1.15 +the number of samples taken. It is ensured that the penalty is always positive,
    1.16 +i.e. results returned by the <code>fair_distance</code> function are always equal to or
    1.17 +greater than the results returned by the <code>distance</code> function regardless of
    1.18 +stochastic effects.</p>
    1.19  
    1.20  <h4><code>GeoJSON_to_epoint(jsonb, text)</code></h4>
    1.21  
     2.1 --- a/README.mkd	Tue Oct 25 18:54:59 2016 +0200
     2.2 +++ b/README.mkd	Tue Oct 25 22:15:17 2016 +0200
     2.3 @@ -494,12 +494,12 @@
     2.4    closest point in the `ecluster` multiplied by the square root of the count of
     2.5    points in the `ecluster`.
     2.6  
     2.7 -The function interally uses a Monte Carlo simulation to compute the result. The
     2.8 -third parameter (which defaults to 10000) can be used to adjust the number of
     2.9 -samples taken. It is ensured that the penalty is always positive, i.e. results
    2.10 -returned by the `fair_distance` function are always equal to or greater than
    2.11 -the results returned by the `distance` function regardless of stochastic
    2.12 -effects.
    2.13 +The function interally uses numerical integration (Monte Carlo like) to compute
    2.14 +the result. The third parameter (which defaults to 10000) can be used to adjust
    2.15 +the number of samples taken. It is ensured that the penalty is always positive,
    2.16 +i.e. results returned by the `fair_distance` function are always equal to or
    2.17 +greater than the results returned by the `distance` function regardless of
    2.18 +stochastic effects.
    2.19  
    2.20  #### `GeoJSON_to_epoint(jsonb, text)`
    2.21  
     3.1 --- a/latlon-v0008.c	Tue Oct 25 18:54:59 2016 +0200
     3.2 +++ b/latlon-v0008.c	Tue Oct 25 22:15:17 2016 +0200
     3.3 @@ -982,9 +982,9 @@
     3.4  }
     3.5  
     3.6  
     3.7 -/*-------------------------------*
     3.8 - *  Monte Carlo based functions  *
     3.9 - *-------------------------------*/
    3.10 +/*------------------------------------------------------------*
    3.11 + *  Functions using numerical integration (Monte Carlo like)  *
    3.12 + *------------------------------------------------------------*/
    3.13  
    3.14  /* half of (spherical) earth's surface area */
    3.15  #define PGL_HALF_SURFACE (PGL_RADIUS * PGL_DIAMETER * M_PI)
    3.16 @@ -1041,7 +1041,7 @@
    3.17    return PGL_HALF_SURFACE * double_share;
    3.18  }
    3.19  
    3.20 -/* calculate covered area using Monte Carlo method */
    3.21 +/* calculate covered area using Monte Carlo like method */
    3.22  /* TODO: inefficient, should be replaced by different method */
    3.23  static double pgl_monte_carlo_area(pgl_cluster *cluster, int samples) {
    3.24    pgl_point *points;

Impressum / About Us