deblais
Exact optimal transport between point clouds
Loading...
Searching...
No Matches
deblais.hpp File Reference

Umbrella header of deblais: exact optimal transport between point clouds. More...

#include "certificate.hpp"
#include "options.hpp"
#include "plan.hpp"
#include "solve.hpp"
#include "tune.hpp"
#include "version.hpp"

Namespaces

namespace  deblais
 Public interface of the library.

Detailed Description

Umbrella header of deblais: exact optimal transport between point clouds.

std::vector<double> x = ..., y = ...; // n points of dimension 2 each
deblais::Plan plan = deblais::solve(2, x, y);
plan.cost; // squared Wasserstein-2 distance
plan.source[k], plan.target[k], plan.mass[k]; // sparse optimal plan
Umbrella header of deblais: exact optimal transport between point clouds.
Plan solve(const Cloud &source, const Cloud &target, const Options &options=Options())
Solves the optimal transport problem between two weighted point clouds for the cost (Options::p,...
Definition solve.hpp:486
An optimal transport plan and its dual certificate.
Definition plan.hpp:66
std::vector< double > mass
Mass shipped along every arc, in the units of the source masses.
Definition plan.hpp:86
std::vector< std::int32_t > target
Index of the target point of every arc.
Definition plan.hpp:84
std::vector< std::int32_t > source
Index of the source point of every arc.
Definition plan.hpp:82
double cost
Transport cost .
Definition plan.hpp:77

The library is header only. Compile with C++17 and, for the parallel solvers, OpenMP (-fopenmp).