Skip to main content

assert_symmetric

Function assert_symmetric 

Source
pub fn assert_symmetric<F>(
    matrix: &ArrayView2<'_, F>,
    name: &str,
    tolerance: F,
) -> CoreResult<()>
where F: Float + Display,
Expand description

Assert that a 2-D matrix is symmetric within a given tolerance.

Checks |A[i,j] - A[j,i]| <= tolerance for all i,j.