Open ben18785 opened 5 years ago
Sure!
With one caveat: The original code is already a bit tricky, if it gets worse we might want to abandon this and have some clarity at the cost of a little duplication!
@MichaelClerx I think the refactored code will be simpler and make it much quicker to extend. I'll give it a go, I reckon! First, would you be able to review #960 so that we can merge Relativistic Monte Carlo before I refactor?
Good stuff!
For the review of #960 I'm comparing relativistic to hamiltonian MCMC using Meld, one of many available diff tools. Doing this might actually be quite useful for your proposed refactoring!
@MichaelClerx Good idea! Will do.
Quite a few algorithms seem to be HMC 2.0 - all they are is HMC but with a different kinetic energy, essentially. They all use leapfrog to integrate.
To make the code more manageable, I'd suggest doing the following restructuring: