CMP++: Uncertainty Quantification & Bayesian Calibration
Loading...
Searching...
No Matches
wasserstein.h File Reference
#include <cmp_defines.h>
#include <vector>
#include <random>
#include <Eigen/Dense>
Include dependency graph for wasserstein.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cmp
 

Functions

double cmp::wasserstein1D (Eigen::VectorXd &s1, Eigen::VectorXd &s2, double p)
 Computes the 1D Wasserstein distance between two empirical distributions.
 
double cmp::slicedWassersteinDistance (const Eigen::MatrixXd &samples_1, const Eigen::MatrixXd &samples_2, double p, int slices, size_t seed=42)
 Computes the sliced-Wasserstein distance of order p between two n-dimensional datasets.