pub fn correlation_function(spins: &[f64], max_r: usize) -> Vec<f64>
Compute the correlation function for a 1D system. C(r) = <s_i s_{i+r}> - <s_i>^2