Struct goko::plugins::gaussians::DiagGaussian [−][src]
Node component, coded in such a way that it can be efficiently, recursively computed.
Fields
moment1: Vec<f32>
First Moment
moment2: Vec<f32>
Second Moment
count: usize
Cover count, divide the first moment by this to get the mean.
Implementations
impl DiagGaussian
[src]
impl DiagGaussian
[src]pub fn new(dim: usize) -> DiagGaussian
[src]
Creates a new empty diagonal gaussian
pub fn dim(&self) -> usize
[src]
Dimension for this
pub fn add_point<T: PointRef>(&mut self, point: &T)
[src]
adds a point to the Diagonal Gaussian
pub fn remove_point<T: PointRef>(&mut self, point: &T)
[src]
removes a point from the Diagonal Gaussian
pub fn merge(&mut self, other: &DiagGaussian)
[src]
Merges two diagonal gaussians together
pub fn mean(&self) -> Vec<f32>
[src]
Mean: moment1/count
pub fn var(&self) -> Vec<f32>
[src]
Variance: moment2/count - (moment1/count)^2
pub fn count(&self) -> usize
[src]
The count used in the above equations
Trait Implementations
impl Clone for DiagGaussian
[src]
impl Clone for DiagGaussian
[src]fn clone(&self) -> DiagGaussian
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ContinousDistribution for DiagGaussian
[src]
impl ContinousDistribution for DiagGaussian
[src]impl Default for DiagGaussian
[src]
impl Default for DiagGaussian
[src]fn default() -> DiagGaussian
[src]
impl<D: PointCloud> NodePlugin<D> for DiagGaussian
[src]
impl<D: PointCloud> NodePlugin<D> for DiagGaussian
[src]Auto Trait Implementations
impl RefUnwindSafe for DiagGaussian
impl RefUnwindSafe for DiagGaussian
impl Send for DiagGaussian
impl Send for DiagGaussian
impl Sync for DiagGaussian
impl Sync for DiagGaussian
impl Unpin for DiagGaussian
impl Unpin for DiagGaussian
impl UnwindSafe for DiagGaussian
impl UnwindSafe for DiagGaussian
Blanket Implementations
impl<T, U> Cast<U> for T where
U: FromCast<T>,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> FromCast<T> for T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub unsafe fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,