isSymmetric
Checks if the given matrix is symmetric within a specified tolerance.
A matrix is considered symmetric if it is square (same number of rows and columns) and satisfies the condition matrixi, j == matrixj, i for all i and j, within the given tolerance.
Return
true
if the matrix is symmetric within the specified tolerance, false
otherwise.
Parameters
matrix
The matrix to be checked for symmetry.
tolerance
The maximum allowable difference between matrixi, j and matrixj, i to still consider the matrix symmetric. Default is 1e-10.