12 #include <grass/gis.h>
14 unsigned char **map, CELL *
min, CELL *
max)
31 *map = xmap = (
unsigned char *)G_malloc(1);
39 len = *max - *min + 1;
40 *map = xmap = (
unsigned char *)G_malloc(len);
43 for (i = first; i <= last; i++) {
51 for (i = 0; i < len; i++)
60 for (i = first; i <= last; i++) {
64 if (count < 0 || cat == 0)
66 x = (sum + (count / 2.0)) / span;
int G_get_histogram_num(const struct Histogram *histogram)
Sorts the histogram in ascending order by counts then category.
CELL G_get_histogram_cat(int n, const struct Histogram *histogram)
Returns cat for the nth element in the histogram.
int G_histogram_eq(const struct Histogram *histo, unsigned char **map, CELL *min, CELL *max)
long G_get_histogram_count(int n, const struct Histogram *histogram)
Returns count for the nth element in the histogram.