I’ve created the issue and started to work on merging the 1D integrator into the language, but I think there may be things we need to fix first.
The doc is a little unclear on types and the type names don’t match in the tparam, but that’s not a big deal.
Shouldn’t there be a data argument for real parameters to the function that aren’t differentiated? And shouldn’t there be a data argument for integer parameters? As is, we’ll have to promote real constants and won’t be able to use integer constants from the program.
I think we want this signature for the function that gets integrated, where
theta is a parameter vector,
x_i are real and integer data, and
y is the variable being integrated:
real f(real y, vector theta, real x_r, int x_i)
Then the function would look like this, where all the variables mean the same thing as above, and
ub anre the integration bounds and
rel_tol are integration tolerances.
real integrate_definite(F f, real lb, real ub, vector theta, real x_r, int x_i, real abs_tol, real rel_tol)
vector type for
real instead? That’s what we did with the other integrators.
Was there a way to use this to do unbounded integrals with transforms or should I just document the straight-ahead definite integral usage for the manual?