Skip to content

Commit dda6ccf

Browse files
committed
doc
1 parent 591eeaf commit dda6ccf

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

src/interp1d/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ use crate::{
3030
mod aliases;
3131
mod strategies;
3232
pub use aliases::*;
33-
pub use strategies::linear::Linear;
3433
pub use strategies::cubic_spline;
34+
pub use strategies::linear::Linear;
3535
pub use strategies::{Interp1DStrategy, Interp1DStrategyBuilder};
3636

3737
/// One dimensional interpolator

src/interp1d/strategies/cubic_spline.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
//! The Cubic Spline interpolation stategy
2+
//!
3+
//! This module defines the [`CubicSpline`] struct which can be used with
4+
//! [`Interp1DBuilder::strategy()`](super::super::Interp1DBuilder::strategy).
5+
//!
6+
//! # Boundary conditions
7+
//! The Cubic Spline Strategy can be customized with bounday conditions.
8+
//! There are 3 Levels of boundary conditions:
9+
//! - [`BoundaryCondition`] The toplevel boundary applys to the whole dataset
10+
//! - [`RowBoundary`] applys to a single row in the dataset (use with [`BoundaryCondition::Individual`])
11+
//! - [`SingleBoundary`] applys to an individual boundary of a single row (use with [`RowBoundary::Mixed`])
12+
//!
13+
114
use std::{
215
fmt::Debug,
316
ops::{Add, Neg, Sub, SubAssign},
@@ -15,8 +28,8 @@ use super::{Interp1DStrategy, Interp1DStrategyBuilder};
1528

1629
const AX0: Axis = Axis(0);
1730

18-
/// Marker trait that is implemented for anithing that satisfies
19-
/// the trait bounds required to be used as an element in the QubicSpline
31+
/// Marker trait that is implemented for anything that satisfies
32+
/// the trait bounds required to be used as an element in the CubicSpline
2033
/// strategy.
2134
pub trait SplineNum:
2235
Debug
@@ -52,7 +65,7 @@ impl<T> SplineNum for T where
5265
{
5366
}
5467

55-
/// The CubicSpline 1d interpolation Strategy
68+
/// The CubicSpline 1d interpolation Strategy (Builder)
5669
///
5770
/// # Example
5871
/// From [Wikipedia](https://en.wikipedia.org/wiki/Spline_interpolation#Example)
@@ -753,6 +766,9 @@ enum Extrapolate {
753766
Periodic,
754767
}
755768

769+
/// The CubicSpline 1d interpolation Strategy (Implementation)
770+
///
771+
/// This is constructed by [`CubicSpline`]
756772
#[derive(Debug)]
757773
pub struct CubicSplineStrategy<Sd, D>
758774
where

0 commit comments

Comments
 (0)