pub fn phase_aligned_error(x_hat: &[f64], x: &[f64]) -> CsResult<f64>Expand description
Align two interleaved-complex vectors up to a global phase and return the relative
reconstruction error ‖x̂ e^{iφ} − x‖ / ‖x‖ minimised over the global phase φ.
Useful for tests since phase retrieval recovers x only up to e^{iφ}.
§Errors
CsError::DimensionMismatch if the two vectors differ in length.