pub struct Theta { /* private fields */ }
Expand description
Theta is a structure that holds the support points These represent the joint population parameter distribution
Each row represents a support points, and each column a parameter
Implementations§
Source§impl Theta
impl Theta
pub fn new() -> Self
Sourcepub fn from_parts(matrix: Mat<f64>, parameters: Parameters) -> Result<Self>
pub fn from_parts(matrix: Mat<f64>, parameters: Parameters) -> Result<Self>
Create a new Theta from a matrix and Parameters
It is important that the number of columns in the matrix matches the number of parameters in the Parameters object
The order of parameters in the Parameters object should match the order of columns in the matrix
Sourcepub fn matrix(&self) -> &Mat<f64>
pub fn matrix(&self) -> &Mat<f64>
Get the matrix containing parameter values
The matrix is a 2D array where each row represents a support point, and each column a parameter
Sourcepub fn matrix_mut(&mut self) -> &mut Mat<f64>
pub fn matrix_mut(&mut self) -> &mut Mat<f64>
Get a mutable reference to the matrix
Sourcepub fn parameters(&self) -> &Parameters
pub fn parameters(&self) -> &Parameters
Get the Parameters object associated with this Theta
Sourcepub fn parameters_mut(&mut self) -> &mut Parameters
pub fn parameters_mut(&mut self) -> &mut Parameters
Get a mutable reference to the Parameters object
Sourcepub fn nspp(&self) -> usize
pub fn nspp(&self) -> usize
Get the number of support points, equal to the number of rows in the matrix
Sourcepub fn param_names(&self) -> Vec<String>
pub fn param_names(&self) -> Vec<String>
Get the parameter names
Sourcepub fn add_point(&mut self, spp: &[f64]) -> Result<()>
pub fn add_point(&mut self, spp: &[f64]) -> Result<()>
Forcibly add a support point to the matrix
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Theta
impl<'de> Deserialize<'de> for Theta
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>,
impl StructuralPartialEq for Theta
Auto Trait Implementations§
impl Freeze for Theta
impl RefUnwindSafe for Theta
impl Send for Theta
impl Sync for Theta
impl Unpin for Theta
impl UnwindSafe for Theta
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,
§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> 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>
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 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>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.