@@ -49,7 +49,8 @@ pub struct NdSpline<'a, T: NdFloat>
4949
5050
5151impl < ' a , T > NdSpline < ' a , T >
52- where T : NdFloat + AlmostEqual
52+ where
53+ T : NdFloat + AlmostEqual
5354{
5455 /// Creates `NdSpline` struct from given `breaks` and `coeffs`
5556 ///
@@ -114,7 +115,9 @@ impl<'a, T> NdSpline<'a, T>
114115/// and data dimension.
115116///
116117/// The methods API of `CubicSmoothingSpline` is implemented as builder-loke pattern or in other
117- /// words as chained API:
118+ /// words as chained API.
119+ ///
120+ /// # Examples
118121///
119122/// ```
120123/// use csaps::CubicSmoothingSpline;
@@ -146,7 +149,9 @@ impl<'a, T> NdSpline<'a, T>
146149/// ```
147150///
148151pub struct CubicSmoothingSpline < ' a , T , D >
149- where T : NdFloat , D : Dimension
152+ where
153+ T : NdFloat ,
154+ D : Dimension
150155{
151156 /// X data sites (also breaks)
152157 x : ArrayView1 < ' a , T > ,
@@ -169,7 +174,9 @@ pub struct CubicSmoothingSpline<'a, T, D>
169174
170175
171176impl < ' a , T , D > CubicSmoothingSpline < ' a , T , D >
172- where T : NdFloat + Default + AlmostEqual , D : Dimension
177+ where
178+ T : NdFloat + Default + AlmostEqual ,
179+ D : Dimension
173180{
174181 /// Creates `CubicSmoothingSpline` struct from the given `X` data sites and `Y` data values
175182 ///
@@ -182,8 +189,9 @@ impl<'a, T, D> CubicSmoothingSpline<'a, T, D>
182189 /// equal to 2 and etc.
183190 ///
184191 pub fn new < X , Y > ( x : X , y : Y ) -> Self
185- where X : AsArray < ' a , T > ,
186- Y : AsArray < ' a , T , D >
192+ where
193+ X : AsArray < ' a , T > ,
194+ Y : AsArray < ' a , T , D >
187195 {
188196 CubicSmoothingSpline {
189197 x : x. into ( ) ,
@@ -236,7 +244,8 @@ impl<'a, T, D> CubicSmoothingSpline<'a, T, D>
236244 /// `weights.len()` must be equal to `x.len()`
237245 ///
238246 pub fn with_weights < W > ( mut self , weights : W ) -> Self
239- where W : AsArray < ' a , T >
247+ where
248+ W : AsArray < ' a , T >
240249 {
241250 self . invalidate ( ) ;
242251 self . weights = Some ( weights. into ( ) ) ;
@@ -248,7 +257,8 @@ impl<'a, T, D> CubicSmoothingSpline<'a, T, D>
248257 /// `weights.len()` must be equal to `x.len()`
249258 ///
250259 pub fn with_optional_weights < W > ( mut self , weights : Option < W > ) -> Self
251- where W : AsArray < ' a , T >
260+ where
261+ W : AsArray < ' a , T >
252262 {
253263 self . invalidate ( ) ;
254264 self . weights = weights. map ( |w| w. into ( ) ) ;
@@ -297,7 +307,8 @@ impl<'a, T, D> CubicSmoothingSpline<'a, T, D>
297307 /// - If the spline yet has not been computed
298308 ///
299309 pub fn evaluate < X > ( & self , xi : X ) -> Result < Array < T , D > >
300- where X : AsArray < ' a , T >
310+ where
311+ X : AsArray < ' a , T >
301312 {
302313 let xi = xi. into ( ) ;
303314 self . evaluate_validate ( xi) ?;
0 commit comments