Skip to content

deblais 0.1.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 13:08
· 2 commits to main since this release

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::solve returns 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::recipe tells what will run.
  • Tuning: deblais::tune (deblais.tune in 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::certify measures the marginals, the duality gap and the dual feasibility of a plan.
  • Python package: deblais.solve and deblais.wasserstein2 for 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