GRASS GIS 7 Programmer's Manual  7.7.svn(2019)-r74298
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
function.c
Go to the documentation of this file.
1 
2 #include <grass/calc.h>
3 
5  {"add", c_varop, f_add},
6  {"sub", c_binop, f_sub},
7  {"mul", c_varop, f_mul},
8  {"div", c_binop, f_div},
9  {"mod", c_binop, f_mod},
10  {"pow", c_binop, f_pow},
11 
12  {"neg", c_unop, f_neg},
13  {"abs", c_unop, f_abs},
14  {"ceil", c_unop, f_ceil},
15  {"floor", c_unop, f_floor},
16 
17  {"gt", c_cmpop, f_gt},
18  {"ge", c_cmpop, f_ge},
19  {"lt", c_cmpop, f_lt},
20  {"le", c_cmpop, f_le},
21  {"eq", c_cmpop, f_eq},
22  {"ne", c_cmpop, f_ne},
23 
24  {"and", c_logop, f_and},
25  {"or", c_logop, f_or},
26 
27  {"and2", c_logop, f_and2},
28  {"or2", c_logop, f_or2},
29 
30  {"not", c_not, f_not},
31 
32  {"bitand", c_logop, f_bitand},
33  {"bitor", c_logop, f_bitor},
34  {"xor", c_logop, f_bitxor},
35 
36  {"shiftl", c_shiftop, f_shiftl},
37  {"shiftr", c_shiftop, f_shiftr},
38  {"shiftru", c_shiftop, f_shiftru},
39 
40  {"bitnot", c_not, f_bitnot},
41 
42  {"sqrt", c_double1, f_sqrt},
43  {"sin", c_double1, f_sin},
44  {"cos", c_double1, f_cos},
45  {"tan", c_double1, f_tan},
46  {"acos", c_double1, f_acos},
47  {"asin", c_double1, f_asin},
48 
49  {"exp", c_double12, f_exp},
50  {"log", c_double12, f_log},
51  {"atan", c_double12, f_atan},
52 
53  {"int", c_int, f_int},
54  {"float", c_float, f_float},
55  {"double", c_double, f_double},
56  {"round", c_round, f_round},
57 
58  {"eval", c_eval, f_eval},
59  {"if", c_if, f_if},
60  {"isnull", c_isnull, f_isnull},
61 
62  {"max", c_varop, f_max},
63  {"min", c_varop, f_min},
64  {"median", c_varop, f_median},
65  {"mode", c_varop, f_mode},
66 
67  {"nmax", c_varop, f_nmax},
68  {"nmin", c_varop, f_nmin},
69  {"nmedian", c_varop, f_nmedian},
70  {"nmode", c_varop, f_nmode},
71 
72  {"graph", c_graph, f_graph},
73  {"graph2", c_graph, f_graph2},
74 
75  {"rand", c_binop, f_rand},
76 
77  {"null", c_int0, f_null},
78 
79  {NULL, NULL, NULL}
80 };
81 
int f_graph2(int argc, const int *argt, void **args)
Definition: xgraph.c:104
int f_sqrt(int argc, const int *argt, void **args)
Definition: xsqrt.c:15
int f_floor(int argc, const int *argt, void **args)
Definition: xfloor.c:14
int f_exp(int argc, const int *argt, void **args)
Definition: xexp.c:16
int f_max(int argc, const int *argt, void **args)
Definition: xmax.c:12
int f_if(int argc, const int *argt, void **args)
Definition: xif.c:243
int f_neg(int argc, const int *argt, void **args)
Definition: xneg.c:10
int f_bitxor(int argc, const int *argt, void **args)
Definition: xbitxor.c:10
int f_sin(int argc, const int *argt, void **args)
Definition: xsin.c:19
int f_median(int argc, const int *argt, void **args)
Definition: xmedian.c:46
int c_float(int argc, int *argt)
Definition: xfloat.c:65
int c_binop(int argc, int *argt)
Definition: check.c:65
int f_asin(int argc, const int *argt, void **args)
Definition: xasin.c:20
int f_rand(int argc, const int *argt, void **args)
Definition: xrand.c:13
int f_not(int argc, const int *argt, void **args)
Definition: xnot.c:10
int f_ne(int argc, const int *argt, void **args)
Definition: xne.c:10
int f_bitor(int argc, const int *argt, void **args)
Definition: xbitor.c:10
int f_nmode(int argc, const int *argt, void **args)
Definition: xnmode.c:53
int c_eval(int argc, int *argt)
Definition: xeval.c:65
int c_shiftop(int argc, int *argt)
Definition: check.c:146
int f_mode(int argc, const int *argt, void **args)
Definition: xmode.c:53
int f_sub(int argc, const int *argt, void **args)
Definition: xsub.c:10
int c_not(int argc, int *argt)
Definition: xnot.c:37
int f_nmax(int argc, const int *argt, void **args)
Definition: xnmax.c:12
int c_double12(int argc, int *argt)
Definition: check.c:37
int f_bitand(int argc, const int *argt, void **args)
Definition: xbitand.c:10
int f_shiftr(int argc, const int *argt, void **args)
Definition: xshiftr.c:10
#define NULL
Definition: ccmath.h:32
int c_graph(int argc, int *argt)
Definition: xgraph.c:13
int f_or2(int argc, const int *argt, void **args)
Definition: xor2.c:17
int f_div(int argc, const int *argt, void **args)
Definition: xdiv.c:10
int f_float(int argc, const int *argt, void **args)
Definition: xfloat.c:13
int c_varop(int argc, int *argt)
Definition: check.c:84
int c_isnull(int argc, int *argt)
Definition: xisnull.c:54
int f_int(int argc, const int *argt, void **args)
Definition: xint.c:13
int f_mul(int argc, const int *argt, void **args)
Definition: xmul.c:10
int f_gt(int argc, const int *argt, void **args)
Definition: xgt.c:10
int f_acos(int argc, const int *argt, void **args)
Definition: xacos.c:20
int f_min(int argc, const int *argt, void **args)
Definition: xmin.c:12
int f_eq(int argc, const int *argt, void **args)
Definition: xeq.c:10
int f_graph(int argc, const int *argt, void **args)
Definition: xgraph.c:29
int f_or(int argc, const int *argt, void **args)
Definition: xor.c:10
int f_ceil(int argc, const int *argt, void **args)
Definition: xceil.c:14
int f_nmin(int argc, const int *argt, void **args)
Definition: xnmin.c:12
int f_cos(int argc, const int *argt, void **args)
Definition: xcos.c:19
int c_double1(int argc, int *argt)
Definition: check.c:24
int f_nmedian(int argc, const int *argt, void **args)
Definition: xnmedian.c:46
int c_int(int argc, int *argt)
Definition: xint.c:65
int f_null(int argc, const int *argt, void **args)
Definition: xnull.c:10
int c_unop(int argc, int *argt)
Definition: check.c:53
int f_shiftru(int argc, const int *argt, void **args)
Definition: xshiftru.c:10
int f_lt(int argc, const int *argt, void **args)
Definition: xlt.c:10
func_desc calc_func_descs[]
Definition: function.c:4
int f_tan(int argc, const int *argt, void **args)
Definition: xtan.c:20
int f_shiftl(int argc, const int *argt, void **args)
Definition: xshiftl.c:10
int f_and2(int argc, const int *argt, void **args)
Definition: xand2.c:17
int f_add(int argc, const int *argt, void **args)
Definition: xadd.c:10
int f_mod(int argc, const int *argt, void **args)
Definition: xmod.c:12
int f_and(int argc, const int *argt, void **args)
Definition: xand.c:10
int f_double(int argc, const int *argt, void **args)
Definition: xdouble.c:13
int f_atan(int argc, const int *argt, void **args)
Definition: xatan.c:21
int c_cmpop(int argc, int *argt)
Definition: check.c:107
int c_if(int argc, int *argt)
Definition: xif.c:271
int f_round(int argc, const int *argt, void **args)
Definition: xround.c:31
int f_pow(int argc, const int *argt, void **args)
Definition: xpow.c:26
int c_int0(int argc, int *argt)
Definition: check.c:4
int c_logop(int argc, int *argt)
Definition: check.c:130
int f_bitnot(int argc, const int *argt, void **args)
Definition: xbitnot.c:10
int f_le(int argc, const int *argt, void **args)
Definition: xle.c:10
int f_ge(int argc, const int *argt, void **args)
Definition: xge.c:10
int f_abs(int argc, const int *argt, void **args)
Definition: xabs.c:14
int f_isnull(int argc, const int *argt, void **args)
Definition: xisnull.c:11
int f_log(int argc, const int *argt, void **args)
Definition: xlog.c:22
int f_eval(int argc, const int *argt, void **args)
Definition: xeval.c:12
Definition: calc.h:21
int c_double(int argc, int *argt)
Definition: xdouble.c:65
int c_round(int argc, int *argt)
Definition: xround.c:183