GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73566
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fpreclass.c File Reference
#include <grass/gis.h>
#include <grass/raster.h>
Include dependency graph for fpreclass.c:

Go to the source code of this file.

Macros

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define NO_DEFAULT_RULE   (! r->defaultDRuleSet)
 
#define NO_LEFT_INFINITE_RULE   (! r->infiniteLeftSet)
 
#define NO_RIGHT_INFINITE_RULE   (! r->infiniteRightSet)
 
#define NO_FINITE_RULE   (r->nofRules <= 0)
 
#define NO_EXPLICIT_RULE
 
#define DEFAULT_MIN   ((DCELL) 1)
 
#define DEFAULT_MAX   ((DCELL) 255)
 

Functions

void Rast_fpreclass_clear (struct FPReclass *r)
 
void Rast_fpreclass_reset (struct FPReclass *r)
 
void Rast_fpreclass_init (struct FPReclass *r)
 
void Rast_fpreclass_set_domain (struct FPReclass *r, DCELL dLow, DCELL dHigh)
 
void Rast_fpreclass_set_range (struct FPReclass *r, DCELL low, DCELL high)
 
int Rast_fpreclass_get_limits (const struct FPReclass *r, DCELL *dMin, DCELL *dMax, DCELL *rMin, DCELL *rMax)
 
int Rast_fpreclass_nof_rules (const struct FPReclass *r)
 
void Rast_fpreclass_get_ith_rule (const struct FPReclass *r, int i, DCELL *dLow, DCELL *dHigh, DCELL *rLow, DCELL *rHigh)
 
void Rast_fpreclass_set_neg_infinite_rule (struct FPReclass *r, DCELL dLeft, DCELL c)
 
int Rast_fpreclass_get_neg_infinite_rule (const struct FPReclass *r, DCELL *dLeft, DCELL *c)
 
void Rast_fpreclass_set_pos_infinite_rule (struct FPReclass *r, DCELL dRight, DCELL c)
 
int Rast_fpreclass_get_pos_infinite_rule (const struct FPReclass *r, DCELL *dRight, DCELL *c)
 
void Rast_fpreclass_add_rule (struct FPReclass *r, DCELL dLow, DCELL dHigh, DCELL rLow, DCELL rHigh)
 
void Rast_fpreclass_reverse_rule_order (struct FPReclass *r)
 
DCELL Rast_fpreclass_get_cell_value (const struct FPReclass *r, DCELL cellVal)
 
void Rast_fpreclass_perform_di (const struct FPReclass *r, const DCELL *dcell, CELL *cell, int n)
 
void Rast_fpreclass_perform_df (const struct FPReclass *r, const DCELL *dcell, FCELL *cell, int n)
 
void Rast_fpreclass_perform_dd (const struct FPReclass *r, const DCELL *dcell, DCELL *cell, int n)
 
void Rast_fpreclass_perform_fi (const struct FPReclass *r, const FCELL *fcell, CELL *cell, int n)
 
void Rast_fpreclass_perform_ff (const struct FPReclass *r, const FCELL *fcell, FCELL *cell, int n)
 
void Rast_fpreclass_perform_fd (const struct FPReclass *r, const FCELL *fcell, DCELL *cell, int n)
 
void Rast_fpreclass_perform_ii (const struct FPReclass *r, const CELL *icell, CELL *cell, int n)
 
void Rast_fpreclass_perform_if (const struct FPReclass *r, const CELL *icell, FCELL *cell, int n)
 
void Rast_fpreclass_perform_id (const struct FPReclass *r, const CELL *icell, DCELL *cell, int n)
 

Macro Definition Documentation

#define DEFAULT_MAX   ((DCELL) 255)

Definition at line 262 of file fpreclass.c.

Referenced by Rast_fpreclass_get_limits().

#define DEFAULT_MIN   ((DCELL) 1)

Definition at line 261 of file fpreclass.c.

Referenced by Rast_fpreclass_get_limits().

#define MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 252 of file fpreclass.c.

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 251 of file fpreclass.c.

#define NO_DEFAULT_RULE   (! r->defaultDRuleSet)

Definition at line 254 of file fpreclass.c.

Referenced by Rast_fpreclass_get_cell_value(), and Rast_fpreclass_get_limits().

#define NO_EXPLICIT_RULE
Value:
#define NO_LEFT_INFINITE_RULE
Definition: fpreclass.c:255
#define NO_FINITE_RULE
Definition: fpreclass.c:257
#define NO_RIGHT_INFINITE_RULE
Definition: fpreclass.c:256

Definition at line 258 of file fpreclass.c.

Referenced by Rast_fpreclass_get_cell_value(), and Rast_fpreclass_get_limits().

#define NO_FINITE_RULE   (r->nofRules <= 0)

Definition at line 257 of file fpreclass.c.

Referenced by Rast_fpreclass_get_cell_value().

#define NO_LEFT_INFINITE_RULE   (! r->infiniteLeftSet)

Definition at line 255 of file fpreclass.c.

Referenced by Rast_fpreclass_get_cell_value().

#define NO_RIGHT_INFINITE_RULE   (! r->infiniteRightSet)

Definition at line 256 of file fpreclass.c.

Referenced by Rast_fpreclass_get_cell_value().

Function Documentation

void Rast_fpreclass_add_rule ( struct FPReclass r,
DCELL  dLow,
DCELL  dHigh,
DCELL  rLow,
DCELL  rHigh 
)
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 
)
int Rast_fpreclass_get_neg_infinite_rule ( const struct FPReclass r,
DCELL dLeft,
DCELL c 
)
int Rast_fpreclass_get_pos_infinite_rule ( const struct FPReclass r,
DCELL dRight,
DCELL c 
)
void Rast_fpreclass_init ( struct FPReclass r)

Definition at line 288 of file fpreclass.c.

References FPReclass::maxNofRules, and Rast_fpreclass_reset().

int Rast_fpreclass_nof_rules ( const struct FPReclass r)

Definition at line 376 of file fpreclass.c.

References FPReclass::nofRules.

void Rast_fpreclass_perform_dd ( const struct FPReclass r,
const DCELL dcell,
DCELL cell,
int  n 
)
void Rast_fpreclass_perform_df ( const struct FPReclass r,
const DCELL dcell,
FCELL cell,
int  n 
)
void Rast_fpreclass_perform_di ( const struct FPReclass r,
const DCELL dcell,
CELL cell,
int  n 
)
void Rast_fpreclass_perform_fd ( const struct FPReclass r,
const FCELL fcell,
DCELL cell,
int  n 
)
void Rast_fpreclass_perform_ff ( const struct FPReclass r,
const FCELL fcell,
FCELL cell,
int  n 
)
void Rast_fpreclass_perform_fi ( const struct FPReclass r,
const FCELL fcell,
CELL cell,
int  n 
)
void Rast_fpreclass_perform_id ( const struct FPReclass r,
const CELL icell,
DCELL cell,
int  n 
)
void Rast_fpreclass_perform_if ( const struct FPReclass r,
const CELL icell,
FCELL cell,
int  n 
)
void Rast_fpreclass_perform_ii ( const struct FPReclass r,
const CELL icell,
CELL cell,
int  n 
)
void Rast_fpreclass_reset ( struct FPReclass r)

Definition at line 276 of file fpreclass.c.

References G_free(), FPReclass::maxNofRules, Rast_fpreclass_clear(), and FPReclass::table.

Referenced by Rast_fpreclass_init().

void Rast_fpreclass_reverse_rule_order ( struct FPReclass r)
void Rast_fpreclass_set_domain ( struct FPReclass r,
DCELL  dLow,
DCELL  dHigh 
)
void Rast_fpreclass_set_neg_infinite_rule ( struct FPReclass r,
DCELL  dLeft,
DCELL  c 
)
void Rast_fpreclass_set_pos_infinite_rule ( struct FPReclass r,
DCELL  dRight,
DCELL  c 
)
void Rast_fpreclass_set_range ( struct FPReclass r,
DCELL  low,
DCELL  high 
)