pub struct FdaData {
pub curves: Option<FdMatrix>,
pub argvals: Option<Vec<f64>>,
pub grouping: Vec<GroupVar>,
pub scalar_vars: Vec<NamedVec>,
pub tabular: Option<FdMatrix>,
pub column_names: Option<Vec<String>>,
pub layers: HashMap<LayerKey, Layer>,
}Expand description
Unified FDA data object for pipeline interchange.
Carries functional data (curves + domain) plus optional analysis layers. Nodes read what they need and add their results as new layers.
Fields§
§curves: Option<FdMatrix>Functional observations (n × m). None for tabular-only data.
argvals: Option<Vec<f64>>Evaluation grid (length m).
grouping: Vec<GroupVar>Named grouping variables (multiple allowed).
scalar_vars: Vec<NamedVec>Named scalar variables (each length n).
tabular: Option<FdMatrix>Tabular data for non-functional variables (n × p).
column_names: Option<Vec<String>>Column names for tabular data.
layers: HashMap<LayerKey, Layer>Analysis results keyed by layer type.
Implementations§
Source§impl FdaData
impl FdaData
Sourcepub fn from_curves(curves: FdMatrix, argvals: Vec<f64>) -> Self
pub fn from_curves(curves: FdMatrix, argvals: Vec<f64>) -> Self
Create from functional curves + grid.
Sourcepub fn from_tabular(tabular: FdMatrix, column_names: Vec<String>) -> Self
pub fn from_tabular(tabular: FdMatrix, column_names: Vec<String>) -> Self
Create from tabular (non-functional) data.
Sourcepub fn require_curves(&self) -> Result<(&FdMatrix, &[f64]), String>
pub fn require_curves(&self) -> Result<(&FdMatrix, &[f64]), String>
Require functional curves to be present.
Sourcepub fn require_layer(&self, key: &LayerKey) -> Result<&Layer, String>
pub fn require_layer(&self, key: &LayerKey) -> Result<&Layer, String>
Require a specific layer to be present.
Sourcepub fn remove_layer(&mut self, key: &LayerKey) -> Option<Layer>
pub fn remove_layer(&mut self, key: &LayerKey) -> Option<Layer>
Remove a layer.
Sourcepub fn layer_keys(&self) -> Vec<&LayerKey>
pub fn layer_keys(&self) -> Vec<&LayerKey>
List all layer keys present.
Sourcepub fn distances(&self) -> Option<&DistancesLayer>
pub fn distances(&self) -> Option<&DistancesLayer>
Get distances layer if present.
Sourcepub fn alignment(&self) -> Option<&AlignmentLayer>
pub fn alignment(&self) -> Option<&AlignmentLayer>
Get alignment layer if present.
Sourcepub fn regression(&self) -> Option<&RegressionLayer>
pub fn regression(&self) -> Option<&RegressionLayer>
Get regression layer if present.
Sourcepub fn clusters(&self) -> Option<&ClusterLayer>
pub fn clusters(&self) -> Option<&ClusterLayer>
Get cluster layer if present.
Sourcepub fn depth(&self) -> Option<&DepthLayer>
pub fn depth(&self) -> Option<&DepthLayer>
Get depth layer if present.
Sourcepub fn outliers(&self) -> Option<&OutlierLayer>
pub fn outliers(&self) -> Option<&OutlierLayer>
Get outlier layer if present.
Sourcepub fn n_obs(&self) -> usize
pub fn n_obs(&self) -> usize
Number of observations (from curves, tabular, or first scalar var).
Sourcepub fn get_scalar(&self, name: &str) -> Option<&[f64]>
pub fn get_scalar(&self, name: &str) -> Option<&[f64]>
Get a scalar variable by name.
Sourcepub fn add_grouping(&mut self, name: impl Into<String>, labels: Vec<String>)
pub fn add_grouping(&mut self, name: impl Into<String>, labels: Vec<String>)
Add a grouping variable with per-observation string labels.
Unique labels are computed automatically in order of first appearance.
Sourcepub fn get_grouping(&self, name: &str) -> Option<&GroupVar>
pub fn get_grouping(&self, name: &str) -> Option<&GroupVar>
Look up a grouping variable by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FdaData
impl RefUnwindSafe for FdaData
impl Send for FdaData
impl Sync for FdaData
impl Unpin for FdaData
impl UnsafeUnpin for FdaData
impl UnwindSafe for FdaData
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.