function.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. {"ceil", c_unop, f_ceil},
  12. {"floor", c_unop, f_floor},
  13. {"gt", c_cmpop, f_gt},
  14. {"ge", c_cmpop, f_ge},
  15. {"lt", c_cmpop, f_lt},
  16. {"le", c_cmpop, f_le},
  17. {"eq", c_cmpop, f_eq},
  18. {"ne", c_cmpop, f_ne},
  19. {"and", c_logop, f_and},
  20. {"or", c_logop, f_or},
  21. {"and2", c_logop, f_and2},
  22. {"or2", c_logop, f_or2},
  23. {"not", c_not, f_not},
  24. {"bitand", c_logop, f_bitand},
  25. {"bitor", c_logop, f_bitor},
  26. {"xor", c_logop, f_bitxor},
  27. {"shiftl", c_shiftop, f_shiftl},
  28. {"shiftr", c_shiftop, f_shiftr},
  29. {"shiftru", c_shiftop, f_shiftru},
  30. {"bitnot", c_not, f_bitnot},
  31. {"sqrt", c_double1, f_sqrt},
  32. {"sin", c_double1, f_sin},
  33. {"cos", c_double1, f_cos},
  34. {"tan", c_double1, f_tan},
  35. {"acos", c_double1, f_acos},
  36. {"asin", c_double1, f_asin},
  37. {"exp", c_double12, f_exp},
  38. {"log", c_double12, f_log},
  39. {"atan", c_double12, f_atan},
  40. {"int", c_int, f_int},
  41. {"float", c_float, f_float},
  42. {"double", c_double, f_double},
  43. {"round", c_round, f_round},
  44. {"eval", c_eval, f_eval},
  45. {"if", c_if, f_if},
  46. {"isnull", c_isnull, f_isnull},
  47. {"max", c_varop, f_max},
  48. {"min", c_varop, f_min},
  49. {"median", c_varop, f_median},
  50. {"mode", c_varop, f_mode},
  51. {"nmax", c_varop, f_nmax},
  52. {"nmin", c_varop, f_nmin},
  53. {"nmedian", c_varop, f_nmedian},
  54. {"nmode", c_varop, f_nmode},
  55. {"graph", c_graph, f_graph},
  56. {"graph2", c_graph, f_graph2},
  57. {"rand", c_binop, f_rand},
  58. {"null", c_int0, f_null},
  59. {NULL, NULL, NULL}
  60. };