Function navtk::non_symmetric_elements

Function Documentation

std::vector<std::pair<Size, Size>> navtk::non_symmetric_elements(const Matrix &mat, double rtol = 1e-5, double atol = 1e-8)

Generate a set of row/column indices for non-symmetric matrix elements.

Parameters
  • mat – Matrix to check. Equal rows/cols are required but not checked.

  • rtol – Relative tolerance allowed between 2 elements; unitless.

  • atol – Absolute tolerance allowed between 2 elements; units determined by elements being compared.

Returns

A vector of pairs of row/col indices (upper triangular only) for corresponding elements that do not match within tolerance.