pub struct LaggedSamplePlan { /* private fields */ }Expand description
Reusable plan for gathering a fixed set of lagged columns.
Implementations§
Source§impl LaggedSamplePlan
impl LaggedSamplePlan
Sourcepub fn new(
series_len: usize,
max_lag: u32,
columns: impl Into<Arc<[LaggedColumn]>>,
) -> Result<Self, DataError>
pub fn new( series_len: usize, max_lag: u32, columns: impl Into<Arc<[LaggedColumn]>>, ) -> Result<Self, DataError>
Plan lagged columns for a series length / max lag (series-origin reference).
§Errors
Invalid lag map, empty column list, or a column lag exceeding max_lag.
Sourcepub fn with_reference(
series_len: usize,
max_lag: u32,
reference: ReferencePointPolicy,
columns: impl Into<Arc<[LaggedColumn]>>,
) -> Result<Self, DataError>
pub fn with_reference( series_len: usize, max_lag: u32, reference: ReferencePointPolicy, columns: impl Into<Arc<[LaggedColumn]>>, ) -> Result<Self, DataError>
Plan lagged columns under an explicit reference-point policy.
§Errors
Invalid lag map, empty column list, or a column lag exceeding max_lag.
Build a plan that reuses a shared lag map and column list (multi-env / panel).
§Errors
Empty column list, or a column lag exceeding the shared map’s max_lag.
Sourcepub fn columns(&self) -> &[LaggedColumn]
pub fn columns(&self) -> &[LaggedColumn]
Planned columns.
Sourcepub fn columns_arc(&self) -> &Arc<[LaggedColumn]>
pub fn columns_arc(&self) -> &Arc<[LaggedColumn]>
Shared column Arc (for multi-env plan reuse).
Sourcepub fn lag_map_arc(&self) -> &Arc<LagMap>
pub fn lag_map_arc(&self) -> &Arc<LagMap>
Shared lag-map Arc (identical lengths can share one map).
Sourcepub fn n_effective(&self) -> usize
pub fn n_effective(&self) -> usize
Effective sample size.
Sourcepub fn prepare<'a>(
&'a self,
data: &TimeSeriesData,
workspace: &'a mut LaggedSampleWorkspace,
policy: &KernelPolicy,
) -> Result<LaggedPreparedSample<'a>, DataError>
pub fn prepare<'a>( &'a self, data: &TimeSeriesData, workspace: &'a mut LaggedSampleWorkspace, policy: &KernelPolicy, ) -> Result<LaggedPreparedSample<'a>, DataError>
Gather planned columns into workspace (grows once, then reuses capacity).
§Errors
Missing / non-float64 columns, series length mismatch, or incomplete series (missing values or a row-hiding analysis mask).
Trait Implementations§
Source§impl Clone for LaggedSamplePlan
impl Clone for LaggedSamplePlan
Source§fn clone(&self) -> LaggedSamplePlan
fn clone(&self) -> LaggedSamplePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more