Analysis API

I think that’s a good idea. I also think the core implementations could go into stan-dev/math, with only the interfaces and I/O dealt with at the Stan level.

I’m most concerned with getting the C++ APIs in better shape for all these functions. We’ve been discussing the effective sample size calcs in another thread and thought vector<const double*> would be general enough to avoid big copies and accomodate both std::vector array types and Eigen::Matrix vector types.

Currently, I/O isn’t handled at the Stan level—it’s just delegated to the interfaces. RStan has the ability to write out output that CmdStan’s analysis tools can read and also write out data that CmdStan can read. It can also read CmdStan data since that’s just an R format. Are you going to be suggesting restarting the JSON/protobuf discussions?