![]() |
SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
|
Class to handle exact semi-discrete optimal transport using Geogram. More...
#include <ExactSot.h>
Public Member Functions | |
ExactSot () | |
Constructor. | |
~ExactSot () | |
Destructor. | |
ExactSot (const ExactSot &)=delete | |
ExactSot & | operator= (const ExactSot &)=delete |
bool | set_source_mesh (const std::string &filename) |
Set source mesh from file. | |
bool | set_target_points (const std::string &filename, const std::string &io_coding) |
Set target points from file. | |
void | set_parameters (unsigned int max_iterations=1000, double epsilon=0.01) |
Set parameters for the solver. | |
bool | run () |
Run the exact SOT computation. | |
std::vector< double > | get_potential () const |
Get computed potential. | |
std::vector< dealii::Point< 3 > > | get_target_points () const |
Get target points. | |
bool | save_results (const std::string &potential_file, const std::string &points_file, const std::string &io_coding="txt") const |
Save computation results to files. | |
Private Member Functions | |
bool | load_volume_mesh (const std::string &filename, GEO::Mesh &mesh) |
Private Attributes | |
std::unique_ptr< GEO::Mesh > | source_mesh |
GEO::vector< double > | potential |
std::vector< dealii::Point< 3 > > | target_points |
unsigned int | max_iterations_ |
double | epsilon_ |
Class to handle exact semi-discrete optimal transport using Geogram.
This class provides a clean interface to compute exact semi-discrete optimal transport between a source mesh and target points using the Geogram library.
Definition at line 39 of file ExactSot.h.
ExactSot::ExactSot | ( | ) |
Constructor.
Definition at line 4 of file ExactSot.cc.
|
default |
Destructor.
|
delete |
bool ExactSot::set_source_mesh | ( | const std::string & | filename | ) |
Set source mesh from file.
filename | Path to the source mesh file |
Definition at line 79 of file ExactSot.cc.
bool ExactSot::set_target_points | ( | const std::string & | filename, |
const std::string & | io_coding | ||
) |
Set target points from file.
filename | Path to the target points file |
Definition at line 83 of file ExactSot.cc.
void ExactSot::set_parameters | ( | unsigned int | max_iterations = 1000 , |
double | epsilon = 0.01 |
||
) |
Set parameters for the solver.
max_iterations | Maximum number of iterations |
epsilon | Convergence tolerance |
Definition at line 87 of file ExactSot.cc.
bool ExactSot::run | ( | ) |
Run the exact SOT computation.
Definition at line 93 of file ExactSot.cc.
std::vector< double > ExactSot::get_potential | ( | ) | const |
Get computed potential.
Definition at line 153 of file ExactSot.cc.
std::vector< dealii::Point< 3 > > ExactSot::get_target_points | ( | ) | const |
bool ExactSot::save_results | ( | const std::string & | potential_file, |
const std::string & | points_file, | ||
const std::string & | io_coding = "txt" |
||
) | const |
Save computation results to files.
potential_file | Path to save potential values |
points_file | Path to save target points |
io_coding | Coding format for file I/O |
Definition at line 161 of file ExactSot.cc.
|
private |
|
private |
Definition at line 111 of file ExactSot.h.
|
private |
Definition at line 112 of file ExactSot.h.
|
private |
Definition at line 113 of file ExactSot.h.
|
private |
Definition at line 116 of file ExactSot.h.
|
private |
Definition at line 117 of file ExactSot.h.