_zeros.pxd 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. # Legacy public Cython API declarations
  2. #
  3. # NOTE: due to the way Cython ABI compatibility works, **no changes
  4. # should be made to this file** --- any API additions/changes should be
  5. # done in `cython_optimize.pxd` (see gh-11793).
  6. ctypedef double (*callback_type)(double, void*)
  7. ctypedef struct zeros_parameters:
  8. callback_type function
  9. void* args
  10. ctypedef struct zeros_full_output:
  11. int funcalls
  12. int iterations
  13. int error_num
  14. double root
  15. cdef double bisect(callback_type f, double xa, double xb, void* args,
  16. double xtol, double rtol, int iter,
  17. zeros_full_output *full_output) nogil
  18. cdef double ridder(callback_type f, double xa, double xb, void* args,
  19. double xtol, double rtol, int iter,
  20. zeros_full_output *full_output) nogil
  21. cdef double brenth(callback_type f, double xa, double xb, void* args,
  22. double xtol, double rtol, int iter,
  23. zeros_full_output *full_output) nogil
  24. cdef double brentq(callback_type f, double xa, double xb, void* args,
  25. double xtol, double rtol, int iter,
  26. zeros_full_output *full_output) nogil