![]() |
SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
|
Modal strategy for map approximation. More...
#include <OptimalTransportPlan.h>
Public Member Functions | |
void | compute_map (const std::function< double(const Point< spacedim > &, const Point< spacedim > &)> distance_function, const std::vector< Point< spacedim > > &source_points, const std::vector< double > &source_density, const std::vector< Point< spacedim > > &target_points, const std::vector< double > &target_density, const Vector< double > &potential, const double regularization_param, const double truncation_radius) override |
Computes the transport map. | |
void | save_results (const std::string &output_dir) const override |
Saves the results to a file. | |
![]() | |
virtual | ~MapApproximationStrategy ()=default |
Additional Inherited Members | |
![]() | |
std::vector< Point< spacedim > > | source_points |
The source points. | |
std::vector< Point< spacedim > > | mapped_points |
The mapped points. | |
std::vector< double > | transport_density |
The transported density. | |
Modal strategy for map approximation.
Maps each source point to the target point that maximizes: score = potential[j] - 0.5*||x-y||^2 + regularization_param * log(target_density[j])
spacedim | The dimension of the space the mesh is embedded in. |
Definition at line 194 of file OptimalTransportPlan.h.
|
overridevirtual |
Computes the transport map.
distance_function | The distance function. |
source_points | The source points. |
source_density | The source density. |
target_points | The target points. |
target_density | The target density. |
potential | The optimal transport potential. |
regularization_param | The regularization parameter. |
truncation_radius | The truncation radius. |
Implements OptimalTransportPlanSpace::MapApproximationStrategy< spacedim >.
Definition at line 100 of file OptimalTransportPlan.cc.
|
overridevirtual |
Saves the results to a file.
output_dir | The directory to save the results to. |
Implements OptimalTransportPlanSpace::MapApproximationStrategy< spacedim >.
Definition at line 192 of file OptimalTransportPlan.cc.