pub struct InvWishart {
pub df: f64,
pub scale: Vec<Vec<f64>>,
/* private fields */
}Expand description
The inverse Wishart distribution of X⁻¹ for X ~ Wishart(ν, Ψ⁻¹) (SciPy’s
invwishart(df, scale = Ψ)): log f(X) = (ν/2) log|Ψ| − (νp/2) log 2 − log Γ_p(ν/2) − ((ν + p + 1)/2) log|X| − tr(Ψ X⁻¹)/2.
Fields§
§df: f64§scale: Vec<Vec<f64>>Implementations§
Source§impl InvWishart
impl InvWishart
pub fn new(df: f64, scale: Vec<Vec<f64>>) -> Result<Self, ErrorsJSL>
pub fn logpdf(&self, x: &Vec<Vec<f64>>) -> Result<f64, ErrorsJSL>
pub fn pdf(&self, x: &Vec<Vec<f64>>) -> Result<f64, ErrorsJSL>
pub fn sample<U: UniformGenerator>( &self, rng: &mut U, ) -> Result<Vec<Vec<f64>>, ErrorsJSL>
Trait Implementations§
Source§impl Clone for InvWishart
impl Clone for InvWishart
Auto Trait Implementations§
impl Freeze for InvWishart
impl RefUnwindSafe for InvWishart
impl Send for InvWishart
impl Sync for InvWishart
impl Unpin for InvWishart
impl UnsafeUnpin for InvWishart
impl UnwindSafe for InvWishart
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