1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Input abstractions for LOESS smoothing.
//!
//! ## Purpose
//!
//! This module provides a unified abstraction for LOESS inputs, allowing the
//! `fit` method to process multiple data formats (slices, vectors, ndarray)
//! through a single interface.
//!
//! ## Design notes
//!
//! * **Zero-copy where possible**: Provides direct slice access to underlying data buffers.
//! * **Interoperability**: Bridges standard Rust collections with specialized numerical libraries.
//! * **Fail-fast validation**: Ensures memory continuity for multi-dimensional types before processing.
//!
//! ## Key concepts
//!
//! * **LoessInput Trait**: The core abstraction that requires types to provide a contiguous slice view.
//! * **Memory Continuity**: Essential for efficient LOESS kernel processing.
//!
//! ## Invariants
//!
//! * Returned slices must represent all elements in the input container.
//! * Inputs must be contiguous in memory; non-contiguous inputs return an error.
//!
//! ## Non-goals
//!
//! * This module does not perform data cleaning or imputation.
//! * This module does not handle data reshaping or dimensionality reduction.
// Feature-gated imports
use ;
// External dependencies
use Float;
// Export dependencies from loess-rs crate
use LoessError;
/// Trait for types that can be used as input for LOESS smoothing.