Skip to content

num::linear::make_symmetric

Defined in header <linear/matrix_properties.hpp>

template <class Mat = mat<real>>
with_law<Mat, law::self_adjoint> make_symmetric(Mat A, real tol = 1e-12);

Check symmetry \(\max_{i,j} |A_{ij} - A_{ji}| \le \mathrm{tol}\) exhaustively, then attach it.

Exceptions

  • std::invalid_argument: If A is not symmetric within tol.