# HG changeset patch # User jbe # Date 1477426517 -7200 # Node ID 10640afbe2ea185232a84ed3de315537ed45518d # Parent fa06fed5e5b4302362a0fa5b86985edd1d2780bf Use the term "numerical integration" instead of "Monte Carlo simulation" in documentation and comments (since no real randomness is involved) diff -r fa06fed5e5b4 -r 10640afbe2ea README.html --- a/README.html Tue Oct 25 18:54:59 2016 +0200 +++ b/README.html Tue Oct 25 22:15:17 2016 +0200 @@ -513,12 +513,12 @@ points in the ecluster. -

The function interally uses a Monte Carlo simulation to compute the result. The -third parameter (which defaults to 10000) can be used to adjust the number of -samples taken. It is ensured that the penalty is always positive, i.e. results -returned by the fair_distance function are always equal to or greater than -the results returned by the distance function regardless of stochastic -effects.

+

The function interally uses numerical integration (Monte Carlo like) to compute +the result. The third parameter (which defaults to 10000) can be used to adjust +the number of samples taken. It is ensured that the penalty is always positive, +i.e. results returned by the fair_distance function are always equal to or +greater than the results returned by the distance function regardless of +stochastic effects.

GeoJSON_to_epoint(jsonb, text)

diff -r fa06fed5e5b4 -r 10640afbe2ea README.mkd --- a/README.mkd Tue Oct 25 18:54:59 2016 +0200 +++ b/README.mkd Tue Oct 25 22:15:17 2016 +0200 @@ -494,12 +494,12 @@ closest point in the `ecluster` multiplied by the square root of the count of points in the `ecluster`. -The function interally uses a Monte Carlo simulation to compute the result. The -third parameter (which defaults to 10000) can be used to adjust the number of -samples taken. It is ensured that the penalty is always positive, i.e. results -returned by the `fair_distance` function are always equal to or greater than -the results returned by the `distance` function regardless of stochastic -effects. +The function interally uses numerical integration (Monte Carlo like) to compute +the result. The third parameter (which defaults to 10000) can be used to adjust +the number of samples taken. It is ensured that the penalty is always positive, +i.e. results returned by the `fair_distance` function are always equal to or +greater than the results returned by the `distance` function regardless of +stochastic effects. #### `GeoJSON_to_epoint(jsonb, text)` diff -r fa06fed5e5b4 -r 10640afbe2ea latlon-v0008.c --- a/latlon-v0008.c Tue Oct 25 18:54:59 2016 +0200 +++ b/latlon-v0008.c Tue Oct 25 22:15:17 2016 +0200 @@ -982,9 +982,9 @@ } -/*-------------------------------* - * Monte Carlo based functions * - *-------------------------------*/ +/*------------------------------------------------------------* + * Functions using numerical integration (Monte Carlo like) * + *------------------------------------------------------------*/ /* half of (spherical) earth's surface area */ #define PGL_HALF_SURFACE (PGL_RADIUS * PGL_DIAMETER * M_PI) @@ -1041,7 +1041,7 @@ return PGL_HALF_SURFACE * double_share; } -/* calculate covered area using Monte Carlo method */ +/* calculate covered area using Monte Carlo like method */ /* TODO: inefficient, should be replaced by different method */ static double pgl_monte_carlo_area(pgl_cluster *cluster, int samples) { pgl_point *points;