pub struct SlicedWasserstein { /* private fields */ }Expand description
Sliced Wasserstein distance calculator
Implementations§
Source§impl SlicedWasserstein
impl SlicedWasserstein
Sourcepub fn new(num_projections: usize) -> Self
pub fn new(num_projections: usize) -> Self
Create a new Sliced Wasserstein calculator
§Arguments
num_projections- Number of random 1D projections (100-1000 typical)
Sourcepub fn from_config(config: &WassersteinConfig) -> Self
pub fn from_config(config: &WassersteinConfig) -> Self
Create from configuration
Sourcepub fn with_power(self, p: f64) -> Self
pub fn with_power(self, p: f64) -> Self
Set the Wasserstein power (1 for W1, 2 for W2)
Trait Implementations§
Source§impl Clone for SlicedWasserstein
impl Clone for SlicedWasserstein
Source§fn clone(&self) -> SlicedWasserstein
fn clone(&self) -> SlicedWasserstein
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlicedWasserstein
impl Debug for SlicedWasserstein
Auto Trait Implementations§
impl Freeze for SlicedWasserstein
impl RefUnwindSafe for SlicedWasserstein
impl Send for SlicedWasserstein
impl Sync for SlicedWasserstein
impl Unpin for SlicedWasserstein
impl UnwindSafe for SlicedWasserstein
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