conspire/math/assert/fd_eq/owned/
rank_1.rs1use super::super::{AssertFd, eq_within_fd_tol_impl};
2use crate::math::assert::{Assert, AssertionError};
3use crate::math::{TensorRank1, TensorRank1List, TensorRank1Vec};
4
5impl<const D: usize, const I: usize> AssertFd<TensorRank1<D, I>> for TensorRank1<D, I> {
6 fn eq_within_fd_tol(
7 tols: &Assert,
8 a: Self,
9 b: TensorRank1<D, I>,
10 ) -> Result<(), AssertionError> {
11 eq_within_fd_tol_impl(tols, &a, &b)
12 }
13}
14
15impl<const D: usize, const I: usize, const W: usize> AssertFd<TensorRank1List<D, I, W>>
16 for TensorRank1List<D, I, W>
17{
18 fn eq_within_fd_tol(
19 tols: &Assert,
20 a: Self,
21 b: TensorRank1List<D, I, W>,
22 ) -> Result<(), AssertionError> {
23 eq_within_fd_tol_impl(tols, &a, &b)
24 }
25}
26
27impl<const D: usize, const I: usize> AssertFd<TensorRank1Vec<D, I>> for TensorRank1Vec<D, I> {
28 fn eq_within_fd_tol(
29 tols: &Assert,
30 a: Self,
31 b: TensorRank1Vec<D, I>,
32 ) -> Result<(), AssertionError> {
33 eq_within_fd_tol_impl(tols, &a, &b)
34 }
35}