Base class for the callbacks executed for each intersection between a Laguerre cell and a simplex of the background mesh.
More...
#include <exploragram/optimal_transport/optimal_transport.h>
Base class for the callbacks executed for each intersection between a Laguerre cell and a simplex of the background mesh.
Definition at line 612 of file optimal_transport.h.
◆ Callback()
◆ funcval()
double GEO::OptimalTransportMap::Callback::funcval |
( |
| ) |
const |
|
inline |
Gets the computed value of the objective function.
This sums the contributions of all threads.
- Return values
-
the | value of the objective function. |
Definition at line 730 of file optimal_transport.h.
◆ has_Laguerre_centroids()
bool GEO::OptimalTransportMap::Callback::has_Laguerre_centroids |
( |
| ) |
const |
|
inline |
Tests whether Laguerre centroids should be computed.
- Return values
-
true | if Laguerre centroids should be computed. |
false | otherwise. |
Definition at line 652 of file optimal_transport.h.
◆ is_Newton_step()
bool GEO::OptimalTransportMap::Callback::is_Newton_step |
( |
| ) |
const |
|
inline |
Tests whether the current step is a Newton step.
- Return values
-
true | if the current step is a Newton step. |
false | otherwise. |
Definition at line 692 of file optimal_transport.h.
◆ Laguerre_centroids()
double* GEO::OptimalTransportMap::Callback::Laguerre_centroids |
( |
| ) |
|
|
inline |
Gets a pointer to the Laguerre centroids.
- Returns
- a pointer to nb vertices * dimension doubles with the centroids of the Laguerre cells times the mass of the Laguerre cells.
Definition at line 662 of file optimal_transport.h.
◆ set_eval_F()
void GEO::OptimalTransportMap::Callback::set_eval_F |
( |
bool |
x | ) |
|
|
inline |
Specifies whether the objective function should be evaluated.
The Newton solver does not need evaluating the objective function, only the BFGS solver needs it.
- Parameters
-
[in] | x | true if the objective function should be evaluated, false otherwise. Default is false. |
Definition at line 721 of file optimal_transport.h.
◆ set_g()
void GEO::OptimalTransportMap::Callback::set_g |
( |
double * |
g | ) |
|
|
inline |
Specifies where the gradient should be stored.
- Parameters
-
[in] | g | a pointer to an array of nb points doubles. |
Definition at line 709 of file optimal_transport.h.
◆ set_Laguerre_centroids()
void GEO::OptimalTransportMap::Callback::set_Laguerre_centroids |
( |
double * |
mg | ) |
|
|
inline |
Sets where centroids should be output.
This computes mass times centroid. The mass can be retreived (and used to divide) from the gradient.
- Parameters
-
[in] | mg | a pointer to the dimension()*nb_points coordinates of the centroids times the mass of the Laguerre cells |
Definition at line 643 of file optimal_transport.h.
◆ set_nb_threads()
void GEO::OptimalTransportMap::Callback::set_nb_threads |
( |
index_t |
nb | ) |
|
|
inline |
Specifies the number of threads.
This allocates one function value per thread.
- Parameters
-
[in] | nb | the number of threads. |
Definition at line 701 of file optimal_transport.h.
◆ set_Newton_step()
void GEO::OptimalTransportMap::Callback::set_Newton_step |
( |
bool |
Newton | ) |
|
|
inline |
Specifies whether current step is a Newton step.
If it is a Newton step, then the Hessian is computed.
- Parameters
-
[in] | Newton | true if the current step is a Newton step, false otherwise. |
Definition at line 683 of file optimal_transport.h.
◆ set_w()
void GEO::OptimalTransportMap::Callback::set_w |
( |
const double * |
w, |
|
|
index_t |
n |
|
) |
| |
|
inline |
Sets the weight vector.
- Parameters
-
[in] | w | a const pointer to the weight vector. |
[in] | n | the number of weights in the weight vector. |
Definition at line 671 of file optimal_transport.h.
The documentation for this class was generated from the following file: