Switched from double-pointer matrix class to armadillo for convenience.
Need to tidy up and figure out how to run the variational method in the
best way.