I’d like to refer to an instance of a stan_model (i.e., an instance of a class which is defined in the stanc generated file) without having the specific class known at compile time. The parent class of is stan::model::prob_grad, so I thought I could use that, but I’m hitting problems using a pointer to a stan::model::prob_grad instance because prob_grad doesn’t define:
which are used in the stan_model.
Is there a reason why there isn’t an (abstract?) parent class of the stan models which do define these things?