1pub mod d2;
5pub mod d3;
7
8use std::ops::Deref;
9
10use super::{abstracts::AbstractModelCsGeneric, model::Cs, types::Dim};
11
12impl<const N: usize> Deref for Cs<N>
15where Cs<N>: Dim
16{
17 type Target = [f64; N];
18 #[inline]
19 fn deref(&self) -> &Self::Target { &self.0 }
20}
21
22impl<const N: usize> AbstractModelCsGeneric<N> for Cs<N>
24where Cs<N>: Dim
25{
26 #[inline]
27 fn new(data: [f64; N]) -> Self { Cs(data) }
28 #[inline]
29 fn origin() -> Self { Cs([0.0; N]) }
30 #[inline]
31 fn as_slice(&self) -> &[f64] { &self.0 }
32}