Skip to main content

conspire/math/assert/eq/owned/
matrix.rs

1use super::super::{AssertEq, eq_impl, eq_within_tols_impl};
2use crate::math::assert::{Assert, AssertionError};
3use crate::math::{SquareMatrix, Vector};
4
5impl AssertEq<Vector> for Vector {
6    fn eq(a: Self, b: Vector) -> Result<(), AssertionError> {
7        eq_impl(&a, &b)
8    }
9    fn eq_within_tols(tols: &Assert, a: Self, b: Vector) -> Result<(), AssertionError> {
10        eq_within_tols_impl(tols, &a, &b)
11    }
12}
13
14impl AssertEq<SquareMatrix> for SquareMatrix {
15    fn eq(a: Self, b: SquareMatrix) -> Result<(), AssertionError> {
16        eq_impl(&a, &b)
17    }
18    fn eq_within_tols(tols: &Assert, a: Self, b: SquareMatrix) -> Result<(), AssertionError> {
19        eq_within_tols_impl(tols, &a, &b)
20    }
21}