|
deblais
Exact optimal transport between point clouds
|
Measured optimality of a plan, as returned by certify(). More...
#include <deblais/certificate.hpp>
Public Member Functions | |
| bool | optimal (double tol=1e-9) const |
| Tells whether every measured error is below a tolerance. | |
Public Attributes | |
| double | primal = 0 |
| Primal value: sum of mass * |x - y|^p over the arcs of the plan. | |
| double | dual = 0 |
| Dual value: \(\sum_i a_i f_i + \sum_j b_j g_j\). | |
| double | gap = 0 |
| Duality gap |primal - dual| / primal. | |
| double | marginal_error = 0 |
| Largest |row or column sum - mass| / total mass. Infinite if an arc has a negative mass. | |
| double | dual_violation = 0 |
| Largest \(f_i + g_j - |x_i - y_j|^p\) over all the pairs, relative to the largest cost. | |
Measured optimality of a plan, as returned by certify().
All the errors are relative: to the total mass for the marginals, to the cost for the gap, and to the largest cost of an arc for the dual violation.
|
inline |
Tells whether every measured error is below a tolerance.
| tol | Relative tolerance. |
tol. | double deblais::Certificate::dual_violation = 0 |
Largest \(f_i + g_j - |x_i - y_j|^p\) over all the pairs, relative to the largest cost.
Non positive up to rounding for an optimal plan. NaN when the check of all the pairs was skipped (all_pairs = false in certify()).