pub struct SamplePlan {
pub columns: Vec<PreparedColumn>,
pub row_selector: PreparedRowSelector,
pub output_layout: SampleLayout,
pub cache_key: SampleCacheKey,
pub partitions: SamplePartitions,
/* private fields */
}Expand description
Reusable compiled sample plan.
Fields§
§columns: Vec<PreparedColumn>Prepared column descriptors in matrix order (X then Y then Z).
row_selector: PreparedRowSelectorRow selector recipe.
output_layout: SampleLayoutOutput layout.
cache_key: SampleCacheKeyCache key.
partitions: SamplePartitionsPartitions.
Implementations§
Source§impl SamplePlan
impl SamplePlan
Sourcepub fn compile_tabular(
data: &TabularData,
request: &SampleRequest<'_>,
) -> Result<Self, DataError>
pub fn compile_tabular( data: &TabularData, request: &SampleRequest<'_>, ) -> Result<Self, DataError>
Compile a plan against tabular (IID) data. Lagged nodes are rejected.
§Errors
Empty request, lagged nodes, unknown variables, or empty selection.
Sourcepub fn compile_timeseries(
data: &TimeSeriesData,
request: &SampleRequest<'_>,
) -> Result<Self, DataError>
pub fn compile_timeseries( data: &TimeSeriesData, request: &SampleRequest<'_>, ) -> Result<Self, DataError>
Compile a plan against a regular time series (supports lagged nodes).
§Errors
Irregular series, empty request, unknown variables, or invalid lags.
Sourcepub fn columns(&self) -> &[PreparedColumn]
pub fn columns(&self) -> &[PreparedColumn]
Planned columns.
Sourcepub fn cache_key(&self) -> &SampleCacheKey
pub fn cache_key(&self) -> &SampleCacheKey
Cache key.
Sourcepub fn prepare<'a>(
&'a self,
data: &impl TableView,
storage_mask: Option<&ValidityBitmap>,
storage_weights: Option<&[f64]>,
workspace: &'a mut SampleWorkspace,
policy: &KernelPolicy,
) -> Result<PreparedSample<'a>, DataError>
pub fn prepare<'a>( &'a self, data: &impl TableView, storage_mask: Option<&ValidityBitmap>, storage_weights: Option<&[f64]>, workspace: &'a mut SampleWorkspace, policy: &KernelPolicy, ) -> Result<PreparedSample<'a>, DataError>
Materialize into workspace.
§Errors
Missing columns, empty selection after policies, or type mismatches.
Sourcepub fn prepare_tabular<'a>(
&'a self,
data: &TabularData,
workspace: &'a mut SampleWorkspace,
policy: &KernelPolicy,
) -> Result<PreparedSample<'a>, DataError>
pub fn prepare_tabular<'a>( &'a self, data: &TabularData, workspace: &'a mut SampleWorkspace, policy: &KernelPolicy, ) -> Result<PreparedSample<'a>, DataError>
Sourcepub fn prepare_timeseries<'a>(
&'a self,
data: &TimeSeriesData,
workspace: &'a mut SampleWorkspace,
policy: &KernelPolicy,
) -> Result<PreparedSample<'a>, DataError>
pub fn prepare_timeseries<'a>( &'a self, data: &TimeSeriesData, workspace: &'a mut SampleWorkspace, policy: &KernelPolicy, ) -> Result<PreparedSample<'a>, DataError>
Trait Implementations§
Source§impl Clone for SamplePlan
impl Clone for SamplePlan
Source§fn clone(&self) -> SamplePlan
fn clone(&self) -> SamplePlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SamplePlan
impl RefUnwindSafe for SamplePlan
impl Send for SamplePlan
impl Sync for SamplePlan
impl Unpin for SamplePlan
impl UnsafeUnpin for SamplePlan
impl UnwindSafe for SamplePlan
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more