Skip to content

num::debug::verify_symmetry_sample

Defined in header <algebra/debug.hpp>

template <class Op, class VectorType>
void verify_symmetry_sample(const Op &A, idx n,
                            std::source_location loc = std::source_location::current());

Sampled test for self-adjointness \(\langle x, A y \rangle = \overline{\langle y, A x \rangle}\).

On a real field this is symmetry \(A = A^T\); on a complex field it is the Hermitian condition \(A = A^*\), which conjugate-free comparison would miss.