OptimalTransport

Trait OptimalTransport 

Source
pub trait OptimalTransport {
    // Required methods
    fn distance(&self, source: &[Vec<f64>], target: &[Vec<f64>]) -> f64;
    fn weighted_distance(
        &self,
        source: &[Vec<f64>],
        source_weights: &[f64],
        target: &[Vec<f64>],
        target_weights: &[f64],
    ) -> f64;
}
Expand description

Trait for optimal transport distance computations

Required Methods§

Source

fn distance(&self, source: &[Vec<f64>], target: &[Vec<f64>]) -> f64

Compute the optimal transport distance between two point clouds

Source

fn weighted_distance( &self, source: &[Vec<f64>], source_weights: &[f64], target: &[Vec<f64>], target_weights: &[f64], ) -> f64

Compute the optimal transport distance with weights

Implementors§