Skip to main content

Ishigami

Struct Ishigami 

Source
pub struct Ishigami {
    pub a: f64,
    pub b: f64,
}
Expand description

Ishigami and Homma’s function, y = sin x₁ + a sin² x₂ + b x₃⁴ sin x₁, each xᵢ uniform on [−π, π].

Its mean is a/2 and its variance and the parts of it are (I. M. Sobol’ and Y. L. Levitan, “On the use of variance reducing multipliers in Monte Carlo computations of a global sensitivity index”, Computer Physics Communications 117, 52–61, 1999, https://doi.org/10.1016/S0010-4655(98)00156-8, p. 57, §5; A. Saltelli and others, Global Sensitivity Analysis: The Primer, Wiley, 2008, pp. 179–182)

  • V = 1/2 + a²/8 + bπ⁴/5 + b²π⁸/18,
  • V₁ = (1 + bπ⁴/5)²/2, V₂ = a²/8, V₃ = 0,
  • V₁₃ = (1/18 − 1/50) b²π⁸ = 8b²π⁸/225, every other part zero,

so Sᵢ = Vᵢ/V, S_T₁ = (V₁ + V₁₃)/V, S_T₂ = V₂/V and S_T₃ = V₁₃/V. The usual parameters, Ishigami::STANDARD, are a = 7, b = 0.1. T. Ishigami and T. Homma, “An importance quantification technique in uncertainty analysis for computer models”, Proceedings of ISUMA ’90, 398–403, 1990, https://doi.org/10.1109/ISUMA.1990.151285, introduced it.

Fields§

§a: f64

The weight of sin² x₂.

§b: f64

The weight of x₃⁴ sin x₁.

Implementations§

Source§

impl Ishigami

Source

pub const STANDARD: Self

a = 7, b = 0.1.

Source

pub fn factors() -> Result<Vec<Factor>, AnalysisError>

Its three factors, x1 to x3, each on [−π, π].

§Errors

None in practice; Factor::new’s, as the type requires.

Source

pub fn evaluate(&self, x: &[f64]) -> f64

y at x = [x₁, x₂, x₃]; NaN for a slice of another length.

Source

pub fn mean(&self) -> f64

Its mean, a/2.

Source

pub fn variance(&self) -> f64

Its variance, V.

Source

pub fn first_order(&self) -> [f64; 3]

The first-order indices, S₁, S₂, S₃.

Source

pub fn total(&self) -> [f64; 3]

The total indices, S_T₁, S_T₂, S_T₃.

Trait Implementations§

Source§

impl Clone for Ishigami

Source§

fn clone(&self) -> Ishigami

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Ishigami

Source§

impl Debug for Ishigami

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Ishigami

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Ishigami

Source§

fn eq(&self, other: &Ishigami) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Ishigami

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Ishigami

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.