void syten::regularise_imag | ( | std::complex< ScalarBase > * | first, |
std::complex< ScalarBase > * | last, | ||
ScalarBase | threshold | ||
) |
Changes the imaginary part of entries with very similar absolute imaginary parts to the median of those.
Handle with care, will introduce errors!
References abs(), std::vector< T >::begin(), std::vector< T >::end(), imag(), std::partition_point(), real(), std::sort(), SYTEN_ASSERT, and syten::Caching::threshold.