Repository navigation
deblais 0.1.0
First version: exact optimal transport between point clouds for the squared Euclidean cost, as a header-only C++17 library and a Python package.
Added
- C++ library (
#include <deblais/deblais.hpp>):deblais::solvereturns an optimal sparse plan, its cost and the Kantorovich potentials, in dimension 1 and above. No dependency; OpenMP is used when available. - Four exact methods: closed form on the line, network simplex with column generation (the cost matrix is never stored), multiscale warm start, and parallel sweeps of a domain decomposition. An auction replaces the simplex on the levels of assignment problems; it gives the problem back to the simplex when it starts a price war (clustered clouds).
- Automatic mode: the method, the arithmetic of the flows (integer or real) and the parameters are chosen from the dimension, the sizes and the masses.
deblais::recipetells what will run. - Tuning:
deblais::tune(deblais.tunein Python) times solves of the given clouds and returns the fastest options on this machine (method, threads, coarsest level of the multiscale start, auction, sweeps). - Certificates:
deblais::certifymeasures the marginals, the duality gap and the dual feasibility of a plan. - Python package:
deblais.solveanddeblais.wasserstein2for NumPy arrays and PyTorch tensors (any device, differentiable cost), with sparse, dense, barycentric map and assignment views of the plan. - The Python module shares the OpenMP runtime of PyTorch when PyTorch is installed.
- Documentation, with a page on the twin project remblais (entropic transport on GPUs).
Full changelog: https://github.com/keckj/deblais/commits/v0.1.0