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);

Verify that a matrix is symmetric, then tag it: \(\max_{ij} |a_{ij} - a_{ji}| \le \mathrm{tol}\).

Exceptions

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