1 2 #include <grass/calc.h> 3 4 func_desc calc_func_descs[] = { 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 82