pub struct ParameterSpace<T> {
pub items: Vec<T>,
}Expand description
Ordered collection of parameters.
Use ParameterSpace<BoundedParameter> for non-parametric problems and
ParameterSpace<UnboundedParameter> for parametric problems.
Fields§
§items: Vec<T>Implementations§
Source§impl<T> ParameterSpace<T>
impl<T> ParameterSpace<T>
Source§impl<T: ParameterMeta> ParameterSpace<T>
impl<T: ParameterMeta> ParameterSpace<T>
Source§impl ParameterSpace<BoundedParameter>
Helpers for bounded parameter spaces.
impl ParameterSpace<BoundedParameter>
Helpers for bounded parameter spaces.
Sourcepub fn bounded() -> Self
pub fn bounded() -> Self
Creates an empty bounded parameter space (for non-parametric problems).
Prefer this over ParameterSpace::<BoundedParameter>::new() to avoid the
turbofish:
ⓘ
let space = ParameterSpace::bounded()
.add("ke", 0.1, 1.0)
.add("v", 1.0, 20.0);Sourcepub fn add(self, name: impl Into<String>, lower: f64, upper: f64) -> Self
pub fn add(self, name: impl Into<String>, lower: f64, upper: f64) -> Self
Adds a bounded parameter with the given name, lower, and upper bounds.
Sourcepub fn finite_ranges(&self) -> Vec<(f64, f64)>
pub fn finite_ranges(&self) -> Vec<(f64, f64)>
Returns (lower, upper) for each parameter.
Source§impl ParameterSpace<UnboundedParameter>
Helpers for unbounded parameter spaces.
impl ParameterSpace<UnboundedParameter>
Helpers for unbounded parameter spaces.
Sourcepub fn unbounded() -> Self
pub fn unbounded() -> Self
Creates an empty unbounded parameter space (for parametric problems).
Prefer this over ParameterSpace::<UnboundedParameter>::new() to avoid
the turbofish.
Sourcepub fn add(self, parameter: impl Into<UnboundedParameter>) -> Self
pub fn add(self, parameter: impl Into<UnboundedParameter>) -> Self
Adds an unbounded parameter to the space.
Trait Implementations§
Source§impl<T: Clone> Clone for ParameterSpace<T>
impl<T: Clone> Clone for ParameterSpace<T>
Source§fn clone(&self) -> ParameterSpace<T>
fn clone(&self) -> ParameterSpace<T>
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 moreSource§impl<T: Debug> Debug for ParameterSpace<T>
impl<T: Debug> Debug for ParameterSpace<T>
Source§impl<T: Default> Default for ParameterSpace<T>
impl<T: Default> Default for ParameterSpace<T>
Source§fn default() -> ParameterSpace<T>
fn default() -> ParameterSpace<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for ParameterSpace<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ParameterSpace<T>where
T: Deserialize<'de>,
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
Source§impl<T> FromIterator<T> for ParameterSpace<T>
impl<T> FromIterator<T> for ParameterSpace<T>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, T> IntoIterator for &'a ParameterSpace<T>
impl<'a, T> IntoIterator for &'a ParameterSpace<T>
Source§impl<T> IntoIterator for ParameterSpace<T>
impl<T> IntoIterator for ParameterSpace<T>
Source§impl<T: PartialEq> PartialEq for ParameterSpace<T>
impl<T: PartialEq> PartialEq for ParameterSpace<T>
Source§fn eq(&self, other: &ParameterSpace<T>) -> bool
fn eq(&self, other: &ParameterSpace<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T> Serialize for ParameterSpace<T>where
T: Serialize,
impl<T> Serialize for ParameterSpace<T>where
T: Serialize,
impl<T> StructuralPartialEq for ParameterSpace<T>
Auto Trait Implementations§
impl<T> Freeze for ParameterSpace<T>
impl<T> RefUnwindSafe for ParameterSpace<T>where
T: RefUnwindSafe,
impl<T> Send for ParameterSpace<T>where
T: Send,
impl<T> Sync for ParameterSpace<T>where
T: Sync,
impl<T> Unpin for ParameterSpace<T>where
T: Unpin,
impl<T> UnsafeUnpin for ParameterSpace<T>
impl<T> UnwindSafe for ParameterSpace<T>where
T: UnwindSafe,
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> Context for T
impl<T> Context for T
fn vector_from_element<V>(&self, len: usize, value: <V as VectorCommon>::T) -> Vwhere
V: Vector<C = Self>,
fn vector_from_vec<V>(&self, vec: Vec<<V as VectorCommon>::T>) -> Vwhere
V: Vector<C = Self>,
fn vector_zeros<V>(&self, len: usize) -> Vwhere
V: Vector<C = Self>,
fn dense_mat_zeros<V>(
&self,
rows: usize,
cols: usize,
) -> <V as DefaultDenseMatrix>::Mwhere
V: Vector<C = Self> + DefaultDenseMatrix,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.