function.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #include <grass/calc.h>
  2. func_desc calc_func_descs[] = {
  3. {"add", c_varop, f_add},
  4. {"sub", c_binop, f_sub},
  5. {"mul", c_varop, f_mul},
  6. {"div", c_binop, f_div},
  7. {"mod", c_binop, f_mod},
  8. {"pow", c_binop, f_pow},
  9. {"neg", c_unop, f_neg},
  10. {"abs", c_unop, f_abs},
  11. {"gt", c_cmpop, f_gt},
  12. {"ge", c_cmpop, f_ge},
  13. {"lt", c_cmpop, f_lt},
  14. {"le", c_cmpop, f_le},
  15. {"eq", c_cmpop, f_eq},
  16. {"ne", c_cmpop, f_ne},
  17. {"and", c_logop, f_and},
  18. {"or", c_logop, f_or},
  19. {"and2", c_logop, f_and2},
  20. {"or2", c_logop, f_or2},
  21. {"not", c_not, f_not},
  22. {"bitand", c_logop, f_bitand},
  23. {"bitor", c_logop, f_bitor},
  24. {"xor", c_logop, f_bitxor},
  25. {"shiftl", c_shiftop, f_shiftl},
  26. {"shiftr", c_shiftop, f_shiftr},
  27. {"shiftru", c_shiftop, f_shiftru},
  28. {"bitnot", c_not, f_bitnot},
  29. {"sqrt", c_double1, f_sqrt},
  30. {"sin", c_double1, f_sin},
  31. {"cos", c_double1, f_cos},
  32. {"tan", c_double1, f_tan},
  33. {"acos", c_double1, f_acos},
  34. {"asin", c_double1, f_asin},
  35. {"exp", c_double12, f_exp},
  36. {"log", c_double12, f_log},
  37. {"atan", c_double12, f_atan},
  38. {"int", c_int, f_int},
  39. {"float", c_float, f_float},
  40. {"double", c_double, f_double},
  41. {"round", c_round, f_round},
  42. {"eval", c_eval, f_eval},
  43. {"if", c_if, f_if},
  44. {"isnull", c_isnull, f_isnull},
  45. {"max", c_varop, f_max},
  46. {"min", c_varop, f_min},
  47. {"median", c_varop, f_median},
  48. {"mode", c_varop, f_mode},
  49. {"nmax", c_varop, f_nmax},
  50. {"nmin", c_varop, f_nmin},
  51. {"nmedian", c_varop, f_nmedian},
  52. {"nmode", c_varop, f_nmode},
  53. {"graph", c_graph, f_graph},
  54. {"graph2", c_graph, f_graph2},
  55. {"rand", c_binop, f_rand},
  56. {"null", c_int0, f_null},
  57. {NULL, NULL, NULL}
  58. };