#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum PolynomialBasis {
Hermite,
Legendre,
Laguerre,
Jacobi {
alpha: f64,
beta: f64,
},
}
#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum TruncationScheme {
TotalDegree,
Hyperbolic {
q: f64,
},
Tensor,
}
#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum CoefficientMethod {
Projection {
quadrature_order: usize,
},
Regression {
n_samples: usize,
seed: u64,
},
}
#[derive(Debug, Clone)]
pub struct PCEConfig {
pub bases: Vec<PolynomialBasis>,
pub max_degree: usize,
pub truncation: TruncationScheme,
pub coefficient_method: CoefficientMethod,
}
#[derive(Debug, Clone)]
pub struct PCEResult {
pub coefficients: Vec<f64>,
pub multi_indices: Vec<Vec<usize>>,
pub basis_norms_squared: Vec<f64>,
pub mean: f64,
pub variance: f64,
pub sobol_indices: Option<Vec<f64>>,
pub total_sobol_indices: Option<Vec<f64>>,
pub n_terms: usize,
}