![]() |
SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
|
Handler for epsilon scaling in multilevel optimization. More...
#include <EpsilonScalingHandler.h>
Public Member Functions | |
EpsilonScalingHandler (const MPI_Comm &comm, double initial_epsilon, double scaling_factor, unsigned int num_steps) | |
Constructor. | |
std::vector< std::vector< double > > | compute_epsilon_distribution (unsigned int num_levels) |
Compute epsilon distribution for multilevel optimization. | |
const std::vector< double > & | get_epsilon_values_for_level (unsigned int level_index) const |
Get epsilon values for a specific level. | |
void | print_epsilon_distribution () const |
Print the epsilon distribution. | |
Private Member Functions | |
std::vector< double > | generate_epsilon_sequence () const |
Generate the sequence of epsilon values. | |
std::vector< std::vector< double > > | distribute_epsilon_values (const std::vector< double > &epsilon_sequence, unsigned int num_levels) |
Distribute epsilon values across levels. | |
Private Attributes | |
MPI_Comm | mpi_communicator |
The MPI communicator. | |
const unsigned int | this_mpi_process |
The rank of the current MPI process. | |
ConditionalOStream | pcout |
A conditional output stream for parallel printing. | |
double | initial_epsilon |
The initial epsilon value. | |
double | scaling_factor |
The scaling factor for epsilon. | |
unsigned int | num_steps |
The total number of epsilon scaling steps. | |
std::vector< std::vector< double > > | epsilon_distribution |
The computed epsilon distribution. | |
Handler for epsilon scaling in multilevel optimization.
This class manages the distribution of epsilon values across different levels of a multilevel optimization process, either for target point clouds or source meshes.
Handler for epsilon scaling in multilevel optimization.
This class manages the distribution of epsilon values across different levels of a multilevel optimization process, either for target point clouds or source meshes.
Definition at line 25 of file EpsilonScalingHandler.h.
EpsilonScalingHandler::EpsilonScalingHandler | ( | const MPI_Comm & | comm, |
double | initial_epsilon, | ||
double | scaling_factor, | ||
unsigned int | num_steps | ||
) |
Constructor.
comm | MPI communicator |
initial_epsilon | Initial epsilon value |
scaling_factor | Factor by which epsilon is scaled between steps |
num_steps | Total number of epsilon scaling steps |
Definition at line 6 of file EpsilonScalingHandler.cc.
std::vector< std::vector< double > > EpsilonScalingHandler::compute_epsilon_distribution | ( | unsigned int | num_levels | ) |
Compute epsilon distribution for multilevel optimization.
num_levels | Number of levels in the hierarchy |
Definition at line 92 of file EpsilonScalingHandler.cc.
const std::vector< double > & EpsilonScalingHandler::get_epsilon_values_for_level | ( | unsigned int | level_index | ) | const |
Get epsilon values for a specific level.
level_index | Index of the level (0 = coarsest) |
Definition at line 102 of file EpsilonScalingHandler.cc.
void EpsilonScalingHandler::print_epsilon_distribution | ( | ) | const |
Print the epsilon distribution.
Definition at line 116 of file EpsilonScalingHandler.cc.
|
private |
Generate the sequence of epsilon values.
Definition at line 30 of file EpsilonScalingHandler.cc.
|
private |
Distribute epsilon values across levels.
epsilon_sequence | Sequence of epsilon values |
num_levels | Number of levels |
Definition at line 44 of file EpsilonScalingHandler.cc.
|
private |
The MPI communicator.
Definition at line 63 of file EpsilonScalingHandler.h.
|
private |
The rank of the current MPI process.
Definition at line 64 of file EpsilonScalingHandler.h.
|
private |
A conditional output stream for parallel printing.
Definition at line 65 of file EpsilonScalingHandler.h.
|
private |
The initial epsilon value.
Definition at line 67 of file EpsilonScalingHandler.h.
|
private |
The scaling factor for epsilon.
Definition at line 68 of file EpsilonScalingHandler.h.
|
private |
The total number of epsilon scaling steps.
Definition at line 69 of file EpsilonScalingHandler.h.
|
private |
The computed epsilon distribution.
Definition at line 71 of file EpsilonScalingHandler.h.