I’m opening this thread to ask some questions about issue #1011, the GP Functor specification. It’s been beautifully outlined for me, to make my job a lot easier/faster. I’m anticipating mostly C++ questions.
So I’m looking at the algebra solver to see how we’re passing in functional arguments. It looks like all the test cases written are declared as a struct, and then passed into the algebra solver with no arguments. I’ve also check out Bob’s lotka-volterra test case to see how user defined functions are are generated in C++, looks like we’ve got about the same thing as in the test cases (cmdstan 2.18):
Whatever it is, it’ll act like a functor in that you’ll be able to apply it. We might replace the explicit structs with closures (lambdas) at some point, but they’re essentially structs under the hood.
is just syntactic sugar for:
That’s a bit too open-ended to answer. Best thing to do is write a bit and have someone look it over if you’re worried about wandering too far down the wrong path.