249 #define NO_DEFAULT_RULE (! r->defaultDRuleSet) 250 #define NO_LEFT_INFINITE_RULE (! r->infiniteLeftSet) 251 #define NO_RIGHT_INFINITE_RULE (! r->infiniteRightSet) 252 #define NO_FINITE_RULE (r->nofRules <= 0) 253 #define NO_EXPLICIT_RULE (NO_FINITE_RULE && \ 254 NO_LEFT_INFINITE_RULE && NO_RIGHT_INFINITE_RULE) 256 #define DEFAULT_MIN ((DCELL) 1) 257 #define DEFAULT_MAX ((DCELL) 255) 309 static void fpreclass_set_limits(
struct FPReclass *
r,
321 static void fpreclass_update_limits(
struct FPReclass *r,
326 fpreclass_set_limits(r, dLow, dHigh, rLow, rHigh);
390 static void fpreclass_table_increase(
struct FPReclass *r)
416 fpreclass_update_limits(r, dLeft, dLeft, c, c);
441 fpreclass_update_limits(r, dRight, dRight, c, c);
467 fpreclass_table_increase(r);
485 fpreclass_update_limits(r, dLow, dHigh, rLow, rHigh);
500 while (pLeft < pRight) {
536 static DCELL fpreclass_get_default_cell_value(
const struct FPReclass *r,
567 return fpreclass_get_default_cell_value(r, cellVal);
572 if ((cellVal >= p->
dLow) && (cellVal <= p->
dHigh))
592 for (i = 0; i < n; i++, dcell++)
606 for (i = 0; i < n; i++, dcell++)
620 for (i = 0; i < n; i++, dcell++)
634 for (i = 0; i < n; i++, fcell++)
648 for (i = 0; i < n; i++, fcell++)
662 for (i = 0; i < n; i++, fcell++)
672 const CELL * icell,
CELL * cell,
int n)
676 for (i = 0; i < n; i++, icell++)
690 for (i = 0; i < n; i++, icell++)
704 for (i = 0; i < n; i++, icell++)
void Rast_fpreclass_add_rule(struct FPReclass *r, DCELL dLow, DCELL dHigh, DCELL rLow, DCELL rHigh)
void Rast_fpreclass_perform_fi(const struct FPReclass *r, const FCELL *fcell, CELL *cell, int n)
void Rast_set_c_null_value(CELL *, int)
To set a number of CELL raster values to NULL.
#define NO_LEFT_INFINITE_RULE
#define Rast_is_d_null_value(dcellVal)
void Rast_fpreclass_set_range(struct FPReclass *r, DCELL low, DCELL high)
void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *r, DCELL dLeft, DCELL c)
int Rast_fpreclass_nof_rules(const struct FPReclass *r)
void G_free(void *)
Free allocated memory.
void Rast_fpreclass_perform_ff(const struct FPReclass *r, const FCELL *fcell, FCELL *cell, int n)
void Rast_fpreclass_reset(struct FPReclass *r)
#define Rast_is_f_null_value(fcellVal)
void Rast_fpreclass_init(struct FPReclass *r)
void Rast_fpreclass_perform_dd(const struct FPReclass *r, const DCELL *dcell, DCELL *cell, int n)
void Rast_fpreclass_perform_id(const struct FPReclass *r, const CELL *icell, DCELL *cell, int n)
void Rast_fpreclass_perform_fd(const struct FPReclass *r, const FCELL *fcell, DCELL *cell, int n)
void Rast_set_f_null_value(FCELL *, int)
To set a number of FCELL raster values to NULL.
int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *r, DCELL *dRight, DCELL *c)
void Rast_fpreclass_perform_ii(const struct FPReclass *r, const CELL *icell, CELL *cell, int n)
void Rast_fpreclass_perform_df(const struct FPReclass *r, const DCELL *dcell, FCELL *cell, int n)
void Rast_fpreclass_perform_if(const struct FPReclass *r, const CELL *icell, FCELL *cell, int n)
int Rast_fpreclass_get_limits(const struct FPReclass *r, DCELL *dMin, DCELL *dMax, DCELL *rMin, DCELL *rMax)
DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *r, DCELL cellVal)
void Rast_fpreclass_reverse_rule_order(struct FPReclass *r)
struct FPReclass_table * table
int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *r, DCELL *dLeft, DCELL *c)
void Rast_fpreclass_perform_di(const struct FPReclass *r, const DCELL *dcell, CELL *cell, int n)
void Rast_fpreclass_clear(struct FPReclass *r)
void Rast_fpreclass_get_ith_rule(const struct FPReclass *r, int i, DCELL *dLow, DCELL *dHigh, DCELL *rLow, DCELL *rHigh)
#define NO_RIGHT_INFINITE_RULE
#define Rast_is_c_null_value(cellVal)
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *r, DCELL dRight, DCELL c)
void Rast_fpreclass_set_domain(struct FPReclass *r, DCELL dLow, DCELL dHigh)