pub struct Sobol { /* private fields */ }Expand description
A Sobol’ analysis: the factors and the number of rows N of each of the samples A and B.
It serializes as its fields, and reads back through Sobol::new’s checks.
Implementations§
Source§impl Sobol
impl Sobol
Sourcepub fn new(factors: Vec<Factor>, rows: usize) -> Result<Self, AnalysisError>
pub fn new(factors: Vec<Factor>, rows: usize) -> Result<Self, AnalysisError>
An analysis of factors with rows rows in each of A and B.
§Errors
AnalysisError::TooFewwith no factors, or fewer than 2 rows (a standard error needs two).AnalysisError::DuplicateFactorfor two factors with one name.AnalysisError::Countfor a design of more thanMAX_DESIGN_POINTSpoints orMAX_DESIGN_VALUEScoordinates.
Sourcepub fn design(&self, seed: u64) -> SobolDesign
pub fn design(&self, seed: u64) -> SobolDesign
The design seeded with seed. Row j draws from its own stream,
SeededRng::for_stream(seed, &[j]), k uniform deviates for A’s row and then k
for B’s, so it is the same however many rows are drawn.
Sourcepub fn indices(
&self,
seed: u64,
model: impl FnMut(&[f64]) -> f64,
) -> Result<SobolIndices, AnalysisError>
pub fn indices( &self, seed: u64, model: impl FnMut(&[f64]) -> f64, ) -> Result<SobolIndices, AnalysisError>
Draws the design seeded with seed, runs model at each of its points in order, and
analyses the outputs (SobolDesign::analyze).
§Errors
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sobol
impl<'de> Deserialize<'de> for Sobol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Sobol
Auto Trait Implementations§
impl Freeze for Sobol
impl RefUnwindSafe for Sobol
impl Send for Sobol
impl Sync for Sobol
impl Unpin for Sobol
impl UnsafeUnpin for Sobol
impl UnwindSafe for Sobol
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Converts
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>
Converts
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 more