|
deblais
Exact optimal transport between point clouds
|
#include <deblais/options.hpp>
Public Attributes | |
| Method | method = Method::automatic |
| Algorithm of the solve. | |
| Flows | flows = Flows::automatic |
| Arithmetic of the flows. | |
| double | p = 2 |
| Exponent of the cost \(|x - y|^p\), positive. | |
| int | threads = 0 |
| Number of threads. 0: the OpenMP default (OMP_NUM_THREADS). | |
| bool | potentials = true |
| Compute the Kantorovich potentials. | |
| double | mass_tolerance = 1e-6 |
| Largest accepted relative difference between the two total masses. | |
Tuning | |
Left at their default, these fields are set by the automatic mode. | |
| int | sweeps = -1 |
| Sweeps of the domain decomposition per level (Method::decomposition). Negative: automatic. | |
| int | cell = 0 |
| Sources per basic cell of the domain decomposition. 0: automatic. | |
| bool | auction = true |
| Run auctions on assignment problems. | |
| int | pool = 0 |
| Arcs kept per source in the pool of the simplex. 0: automatic. | |
| int | helpers = -1 |
| Threads that price ahead of the simplex on large problems. Negative: automatic. | |
| int | min_size = 0 |
| Size of the coarsest level of the multiscale start. 0: automatic. | |
The defaults select the automatic mode: an Options() is the right choice unless a measurement says otherwise. The tuning fields keep their automatic value when left at their default.
| double deblais::Options::p = 2 |
Exponent of the cost \(|x - y|^p\), positive.
The default, 2, is the squared Euclidean cost of the Wasserstein-2 distance: the automatic mode was tuned on it, and it alone keeps the float32 filter of the pricing. Every exponent gives an exact plan, but for the others the automatic mode is not always the fastest choice: tune() finds a better one. Method::line needs \(p \ge 1\) (a convex cost).
| bool deblais::Options::potentials = true |
Compute the Kantorovich potentials.
They come for free with every method except Method::line, where disabling them saves a pass over the points.
| double deblais::Options::mass_tolerance = 1e-6 |
Largest accepted relative difference between the two total masses.
Within this tolerance, the target masses are rescaled to the total of the sources. Beyond it, solve() throws std::invalid_argument.
| bool deblais::Options::auction = true |
Run auctions on assignment problems.
When both clouds have the same number of points and uniform masses, the levels of the multiscale start are solved by an auction instead of the simplex. The final simplex still certifies the optimum.
| int deblais::Options::min_size = 0 |
Size of the coarsest level of the multiscale start. 0: automatic.
The clouds are clustered until the larger one has at most this number of points; that level is solved by the simplex from scratch.